NXP-12418: change method to check for gadgets loading, adapting corresponding logics from selenium tests