check the existence of a dynamic webpage

Advanced programming using WinTask scripting language

check the existence of a dynamic webpage

Postby Yasir on Fri Sep 13, 2013 7:44 am

Is there a way to check for existence of an html element on a webpage?

I have a script that clicks a link on a webpage and based on the status of a given order, the website returns different webpages (with different names) and different url's that I want to click next.

What I need to figure out in my script is which of the dynamically generated webpages has loaded (need to check for existence of a window that has a webpage whose name begins with lets say "status" or "error" or "completed" and inside the page I need to check if the page provides a specific url link that I can have my script click on - if it exists, I would have the script click on the link.

Any suggestions?
Posts: 18
Joined: Tue Jun 21, 2005 5:18 pm

Re: check the existence of a dynamic webpage

Postby TechSupport on Tue Sep 17, 2013 10:02 am


To test a specific text within a web page, you can use ExistHTMLElement. If you need to test if it's page A or page B which is loaded, then you can use this structure:
ret=UsePage("Page A")
If ret<>0 then
ret1=UsePage("Page B")
If ret1<>0 then
msgbox("page A or page B not loaded")
msgbox("page B loaded")
msgbox("page A loaded")

WinTask Tech Support
Posts: 805
Joined: Thu Nov 16, 2006 9:58 am

Return to Scripts programming

Who is online

Users browsing this forum: No registered users and 1 guest