Forum Discussion
- Mr_BroFrequent Contributor
Hi DSmachineWorld,
If you are trying to achieve in web applications the other approach would be to make use of FindElements Method
please refer the below code snippet for your reference
function FindElements_Example() { var browser = Sys.Browser(); var page = browser.Page("*services.smartbear.com/samples/TestComplete*/smartstore*"); var links = page.FindElements("//body//a"); if (links.length > 0) { for (var i = 0; i < links.length; i++) { /* Write your logic here to click each link and verify the page is valid or not for our example we can print the innertext property */ Log.Message(links[i].innerText); } } else { Log.Message("visited all the link."); } }
Related Content
- 4 years ago
- 3 years ago
Recent Discussions
- 6 days ago
- 6 days ago
- 10 days ago