In my dynamic CRM environment element is not clickable until entire page is loaded.
I was trying the following methods to check if page is loaded:
webDocument.WaitForDocumentLoaded(Global.WaitTime); // did not work
Validate.Exists(rxPath, wait1, "Load found", false) //did not quite work. Element is visible but not clickable
I want something similar to Selenium functionality like the following:
_driver = new InternetExplorerDriver(options);
_wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(20));
_wait.Until(ExpectedConditions.ElementToBeClickable(By.Id("navTabModuleButtonTextId")))
Is anything in Ranorex similar to "ElementToBeClickable" function?
Thanks a lot,
Nik
How to check if element IsClickable ?
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: How to check if element IsClickable ?
Hello Nik,
Basically, the WaitForDocumentLoaded() function checks the readyState-Java Script property. Information about this property can be found at the following web page. Please note that in some cases the WaitForDocumentLoaded() function doesn’t work properly because it depends on the browser and on the implementation of the web page. For example, the method is not very reliable when automating dynamically loaded web pages.
Unfortunately, there is no similar function to "ElementToBeClickable". In such cases, it is recommended using the WaitFor Exists action to wait for a specific web element to be loaded. First, you will need to figure out any element that indicates that the web page was loaded successfully. After that, you could add the function to wait for this web element to exist.
I hope this information will help you.
Sincerely,
Johannes
Basically, the WaitForDocumentLoaded() function checks the readyState-Java Script property. Information about this property can be found at the following web page. Please note that in some cases the WaitForDocumentLoaded() function doesn’t work properly because it depends on the browser and on the implementation of the web page. For example, the method is not very reliable when automating dynamically loaded web pages.
Unfortunately, there is no similar function to "ElementToBeClickable". In such cases, it is recommended using the WaitFor Exists action to wait for a specific web element to be loaded. First, you will need to figure out any element that indicates that the web page was loaded successfully. After that, you could add the function to wait for this web element to exist.
I hope this information will help you.
Sincerely,
Johannes