How to wait until all opened tabs/pages are loaded in browser without verifying title or ranorex repository element.
Please provide me the usercode
Wait until all pages load in ranorex
Re: Wait until all pages load in ranorex
Hi,
Unfortunately, there is too little info about your problem. Generally speaking, you can use
WaitForDocumentLoaded (InvokeAction) method, which waits for web page to complete its loading. You have to define DOM repo element for this action. Additionally, you can add [@state='complete'] attribute at the end of DOM element in repo, which should pause the execution of test until the DOM element is completely loaded.
I don't quite understand your need to wait for loading of multiple web pages/tabs, because Ranorex can work with just one actually active/loaded web page? Could you please describe your problem in more details?
Unfortunately, there is too little info about your problem. Generally speaking, you can use
WaitForDocumentLoaded (InvokeAction) method, which waits for web page to complete its loading. You have to define DOM repo element for this action. Additionally, you can add [@state='complete'] attribute at the end of DOM element in repo, which should pause the execution of test until the DOM element is completely loaded.
I don't quite understand your need to wait for loading of multiple web pages/tabs, because Ranorex can work with just one actually active/loaded web page? Could you please describe your problem in more details?
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 until all pages load in ranorex
Hi Praneet,
You can create a repository element with Rxpath "/dom". This would in essence be a refrence to all the dom elements (open web pages in all open browsers). Next you can use the code below to check if a webpage has finished loading comlpletely for a specific browser
This code would wait, in sequence, for all webpages opened in Chrome browser to be loaded completely.
BR
Manish
You can create a repository element with Rxpath "/dom". This would in essence be a refrence to all the dom elements (open web pages in all open browsers). Next you can use the code below to check if a webpage has finished loading comlpletely for a specific browser
Code: Select all
var domList = repo.dom.SelfInfo.CreateAdapters<Unknown>();
foreach(var dom in domList){
if(dom.GetAttributeValue<string>("browsername").Equals("Chrome")){
while(!dom.GetAttributeValue<string>("state").Equals("complete")){
Delay.Duration(1000);
}
}
}
BR
Manish