scape2code 0 Posted December 11, 2018 I want to it to sleep until the widget is visibile but I get a null pointer exception until that actually happens but its only going to be null or only supposed to be null until I interact with the 2 objects what do I do to fix this or does it not matter. It seems like my program may skip a sleep statement which throws everything off. Code below is basically just me debugging problem if(getWidgets().getWidgetChild(270,14,38) == null) { log("widget child isnot visible yet"); sleepUntil(()->getWidgets().getWidgetChild(270,14,38).isVisible(),10000); log("widget child is visible son"); }
Randerson 28 Posted December 11, 2018 You enter that if statement when the widget is equal to null, so you are getting a null pointer exception when you do sleepUntil(()->getWidgets().getWidgetChild(270,14,38).isVisible(),10000); because you are trying to do that on a null widget. Instead maybe you could try something like sleepUntil(()->getWidgets().getWidgetChild(270,14,38) != null,10000);
Recommended Posts
Archived
This topic is now archived and is closed to further replies.