iphone - How to know any UI rendering is completed in automation code -
i wanting know button rendered on main window ui or not. button rendering depending on server response result (written in objective c). if server response comes becomes render (visible) otherwise not present there (invisible). , whenever becomes visible tap on further next process.
i wrote code
uiatarget.localtarget().pushtimeout(200); //my code uiatarget.localtarget().poptimeout();
by above code have wait till 200 sec concern want wait whenever object on screen don't want keep me busy in waiting mode.
how write code in automation?
thanks
ok, might give idea how follow-up:
for view implement accessibilityvalue method returns json formatted value:
- (nsstring *)accessibilityvalue { return [nsstring stringwithformat: @"{'mybuttonisvisible':%@}", self.mybutton.ishidden ? @"false" : @"true"]; }
then somehow can access test javascript:
var thisproperty = eval("(" + element.value() + ")"); if (thisproperty.mybuttonisvisible) { uiatarget.localtarget().tap({"x":100, "y":100}); }
hope helps.
Comments
Post a Comment