Forum Discussion
programdoubts
12 years agoContributor
Hi Alexei Karas,
Thank you very much for reply, my main doubt is not only the clicking on link.
as per u, we can use ToURL method for my scenario,
but we can use ToURL method, only when i know the next navigation page URL only
suppose the url is dynamic then how can i use ToURL method if i don’t know the URL ?
Please see the below scenario, it’s a common scenario where I’m facing problem
Example: Scenario
I'm having login page
i have entered username and password and click submit button
Now my application will navigate/ redirect to Home Page
In Home page, application contains Forget password button/ link
Now i want to click on Forget password button/ link and fill the details
Here my problem is,
After entering username password,
I clicked on submit button and the page is navigating to home page
here my problem comes into picture
after clicking on submit button, its navigating/ redirecting to Home page
before navigated/ redirected(loading page fully) to Home page the next script is executing, which is clicking on Forget password button
now I’m getting error, because still the page is in navigating/ redirecting/ busy mode, i.e still page is in progress,
but my next script which i want to click the Forget password script is activated, script is trying to click on Forget password but the page is not yet navigated/ redirected(loaded page fully)
so page doesn't contain Forget password button/ link, so its throwing error
but these problem i didn't face in other tools which i have already implemented, because internally they are checking whether page gets loaded fully or not, then only the are executing next script, obviously script will continue smoothly
the same problem i have faced in QTP also, but when i have written external code, its working fine
The code which i have written is to check still the page is in busy mode or page loaded fully
if page is busy then tool will wait until the page navigates/ redirected(loads page fully)
Example code which i have used in QTP to check whether page fully loaded or not
After each action where I want to check whether page gets fully loaded or not, i will call this method, so it will take care of tool to wait until page get redirected/ fully loaded
the same kind of code i have written in TestComplete also but it’s not working and not able to wait until page redirects/ loaded fully, even after written external code
Code which I have written in TestComplet is shown below
One more thing is, in some other tools which i have used,
even i have not written this code also, but its working fine, internally the tool itself checking whether page gets fully loaded of not, then only its performing the next script action, so we wont get any error in this situation
internally they have provided the functionality of checking this scenario, without writing any external script
plsss let me know is there any internal functionality or code like above to make wait, page until redirects without using wait kind of functions
thanks in advance
Thank you very much for reply, my main doubt is not only the clicking on link.
as per u, we can use ToURL method for my scenario,
but we can use ToURL method, only when i know the next navigation page URL only
suppose the url is dynamic then how can i use ToURL method if i don’t know the URL ?
Please see the below scenario, it’s a common scenario where I’m facing problem
Example: Scenario
I'm having login page
i have entered username and password and click submit button
Now my application will navigate/ redirect to Home Page
In Home page, application contains Forget password button/ link
Now i want to click on Forget password button/ link and fill the details
Here my problem is,
After entering username password,
I clicked on submit button and the page is navigating to home page
here my problem comes into picture
after clicking on submit button, its navigating/ redirecting to Home page
before navigated/ redirected(loading page fully) to Home page the next script is executing, which is clicking on Forget password button
now I’m getting error, because still the page is in navigating/ redirecting/ busy mode, i.e still page is in progress,
but my next script which i want to click the Forget password script is activated, script is trying to click on Forget password but the page is not yet navigated/ redirected(loaded page fully)
so page doesn't contain Forget password button/ link, so its throwing error
but these problem i didn't face in other tools which i have already implemented, because internally they are checking whether page gets loaded fully or not, then only the are executing next script, obviously script will continue smoothly
the same problem i have faced in QTP also, but when i have written external code, its working fine
The code which i have written is to check still the page is in busy mode or page loaded fully
if page is busy then tool will wait until the page navigates/ redirected(loads page fully)
Example code which i have used in QTP to check whether page fully loaded or not
Function pageWait()
set objReadyState = Browser("micclass:=Browser").page("micclass:=Page").Object
While objReadyState.readyState = "Completed"
Wend
Set objReadyState=nothing
End Function
After each action where I want to check whether page gets fully loaded or not, i will call this method, so it will take care of tool to wait until page get redirected/ fully loaded
the same kind of code i have written in TestComplete also but it’s not working and not able to wait until page redirects/ loaded fully, even after written external code
Code which I have written in TestComplet is shown below
Function waitUntilPageNavigate()
Set Object=Sys.Browser("*").Page("*")
While Object.readyState = "complete"
Wend
Set Object=nothing
End Function
One more thing is, in some other tools which i have used,
even i have not written this code also, but its working fine, internally the tool itself checking whether page gets fully loaded of not, then only its performing the next script action, so we wont get any error in this situation
internally they have provided the functionality of checking this scenario, without writing any external script
plsss let me know is there any internal functionality or code like above to make wait, page until redirects without using wait kind of functions
thanks in advance
Related Content
Recent Discussions
- 3 days ago