Quantcast
Channel: Wamboo Tracker
Viewing all articles
Browse latest Browse all 20

Re: Best way to test if an element doesnt exist

$
0
0

Hi, there is a few possible options:

 

1) WaitWindow

 

var p = Sys.Process("app"); Indicator.PushText('Checking object...'); var obj = p.WaitWindow("propValue", "Value", -1, 1000); Indicator.Clear(); if(obj .Visible) obj.Click();

 

2) Aliases

 

Aliases.app.obj1.RefreshMappingInfo(); var activeObject = Aliases.app.obj1.FindAllChildren("propName", "*"); if(aqObject.GetProperties(activeObject ).Count != 0) return true; else return false;

 

3) Exist

 

var p = Sys.Process("Impuls"); var obj= p.WaitWindow("propName", "propValue", -1, 1000); if(obj.Exists == true) { obj.Find("propName", 'propValue', [treeValue]).Click(); }

 

4) Wait for element until it's exist

 

function waitUntil(obj, licznik) { var licznik = licznik || 60; for (var i = 1; i <= licznik; i++) { if (obj.Exists == true) { aqUtils.Delay(1000); } else { break; } } }

Viewing all articles
Browse latest Browse all 20

Trending Articles