Hello !
I have a problem when I want to take a screenshot.
I have a scenario that runs on Internet Explorer, Firefox and Google Chrome. I have to take a screenshot of the final screen at the end of the scenario. Before taking the screenshot, I do a "Wait for" on the URL, then I do a "Validation" on the URL and then I take the screenshot. But sometimes the page is not fully loaded and the screenshot is blank or even on the previous screen.I read everywhere in the forum that I should use "Wait for" (which I already do) or use "WaitForDocumentLoaded()", but apparently it's not recommended.
How can I fix this problem ?
Thank you.
Wait for Screenshot
Re: Wait for Screenshot
Hi,
In contrary, WaitForDocumentLoaded is very useful and I don't see a reason, why not to use it? The only problem could be with ajax-based apps (and similar dynamically loaded pages), where the WaitForDocumentLoaded could fail to wait.
Another possibility is to add @state='complete' to the DOMs xpath.
In contrary, WaitForDocumentLoaded is very useful and I don't see a reason, why not to use it? The only problem could be with ajax-based apps (and similar dynamically loaded pages), where the WaitForDocumentLoaded could fail to wait.
Another possibility is to add @state='complete' to the DOMs xpath.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Wait for Screenshot
I use WaitForDocumentLoaded() myself. Today I learned that I can also add a condition to my repository item for the DOM I'm loading, "and @state='complete'" which I had not previously known about. I tweaked all my browser based repository items to include that little extra condition.