Forum Discussion
rraghvani
12 months agoChampion Level 3
Using the following website https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_toggle_hide_show, here's sample code that uses WaitElement method to wait for 'This is my DIV element.' block to appear.
function Element()
{
var page = Aliases.browser.Page("https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_toggle_hide_show").FindElement("#iframeResult")
var element = page.WaitElement("//DIV[@style='display: block;']", 10000);
if (element.Exists)
Sys.HighlightObject(element);
else
Log.Message("Element does not exist");
}
Related Content
- 2 years ago
Recent Discussions
- 12 hours ago
- 2 days ago