在QTP中,我们可以使用以下代码:
if obj1.exist(5)
obj1.click;
else
obj2.click
我们可以控制等待时间,如果UI存在,我们可以做一些操作。
如何解决相同的Monkey Talk情况JS?
我可以用 获得IOS设备的方向JS吗?
在QTP中,我们可以使用以下代码:
if obj1.exist(5)
obj1.click;
else
obj2.click
我们可以控制等待时间,如果UI存在,我们可以做一些操作。
如何解决相同的Monkey Talk情况JS?
我可以用 获得IOS设备的方向JS吗?
Use the following to see if a component exists, Label * Verify %timeout=10000. This will wait 10 seconds to find a label. You can use JavaScript like the following...
try {
app.label().verify(); //if label exists
} catch(Exception err) {
app.debug().print("Label not found");
}
To get the orientation you can do the following, Device * var orientation