Forum Discussion
tristaanogre
Esteemed Contributor
Right... because you're calling code in your IF clause for an object that might not exist yet. Your "Exists" check should happen first, before anything else, as anything else will fail if the object does not exist.
let navigate = Aliases.browser.page.nav let navbar = Aliases.browser.page.header if (navigate.WaitAliasChild('carrier', 5000).Exists){ if (navigate.WaitAliasChild('carrier', 5000).Width != 0) { Log.Message("carrier exists"); } else { Log.Message("carrier "); } }
TanyaYatskovska
6 years agoSmartBear Alumni (Retired)
Related Content
- 12 months ago
- 6 years ago