scape2code 0 Share 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"); } Link to comment Share on other sites More sharing options...
Randerson 28 Share 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); Link to comment Share on other sites More sharing options...
scape2code 0 Author Share Posted December 11, 2018 just fixed ty tho Link to comment Share on other sites More sharing options...
Randerson 28 Share Posted December 11, 2018 No problem Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.