How to wait for new url/page, until get reflect by not using static delay times?
Hi,
We are using the DOM Model to identify the objects in UI. As the url is changing every time, what we have done is we are taking current URL from the Browser url location i.e
Url1= Sys.Process("IEXPLORE").IEFrame(0).Window("WorkerW", "Navigation Bar", 1).Window("ReBarWindow32", "", 1).Window("Address Band Root", "", 1). wText.
a
nd sending this “Url1”while writing the code. i.eStr1=Sys.Process("IEXPLORE").Page(Url1).document.all.Item("HTML").innerText
Also we are using static delay time to stop execution of script until page url chaging
aqUtils.Delay 5000
So my final code would be like this.
---------------------
If Sys.Process("IEXPLORE").Page(url1).document.all.waitItem(ButtonID,1000).Click() then
Sys.Process("IEXPLORE").Page(url1).document.all.Item(ButtonID).Click()
End if
aqUtils.Delay 5000
Url1= Sys.Process("IEXPLORE").IEFrame(0).Window("WorkerW", "Navigation Bar", 1).Window("ReBarWindow32", "", 1).Window("Address Band Root", "", 1). wText.
Sys.Process("IEXPLORE").Page(url1).wait()
Str1=Sys.Process("IEXPLORE").Page(url1).document.all.Item("HTML").innerText
---------------------
Perform some action like “ Cick on Login Button” -> This will lead to new page and that new page url get reflect in browser url location after some time. So we have used delay time. This delay time is varies from time to time.
My question is, how to wait for new url/page, untilget reflect by not using static delay times.
I have tried by using “waitPage”,But this require new url. To get this new url I have wait for some time. Again I have to use some constant delay timings. Please help us to overcome this issue.
Regards,
Vinod