How to ignore hidden frames in Webdriver

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

How to ignore hidden frames in Webdriver

sujata
Hi Tarun,

Is there a way to ignore hidden frames using Webdriver? As can be done using registry settings with QTP

Thanks,
Sujata
Reply | Threaded
Open this post in threaded view
|

Re: How to ignore hidden frames in Webdriver

softwaretestingforum
Administrator
not quite sure what you are referring ignoring hidden frame, could you please elaborate?
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: How to ignore hidden frames in Webdriver

sujata
Hi Tarun,

There is a frame on a page in our application which loads asynchronously, and due to this not able to perform any operation on the page (when automating it).

Though the elements on the page are visible.

Can you help?

Thanks,
Sujata

Reply | Threaded
Open this post in threaded view
|

Re: How to ignore hidden frames in Webdriver

softwaretestingforum
Administrator
You can try waiting for it either implicitly or explicitly in Web driver. Have you tried this?
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: How to ignore hidden frames in Webdriver

sujata
Yes.. Have tried both implicit and explicit wait, but these do not help
Reply | Threaded
Open this post in threaded view
|

Re: How to ignore hidden frames in Webdriver

softwaretestingforum
Administrator
Then I would have to ask you to post you code and small html of frame.
It is difficult to answer this question with out more details.
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: How to ignore hidden frames in Webdriver

sujata
Hi Tarun,

Part of the frame goes like this:


<IFRAME id="hdnAutoCompleteFrame" style="DISPLAY: none" src="/Workspace/Blank.html"></IFRAME><IFRAME id="workframe" style="DISPLAY: none" name="workframe" src="/Workspace/Blank.html"></IFRAME><IFRAME id="historyframe" style="DISPLAY: none" name="historyframe" src="/Workspace/History.html?PgID=9c9e5385-3755-48dd-915e-87c1f53679bd" onload="if(typeof historyFrameLoad == 'function')historyFrameLoad(this);"></IFRAME>

Part of my code goes like this:

page.Login(driver, sURL, sUsername, sPassword);
System.out.println("Logged in");
WebElement element = driver.findElement(By.id("go"));
element.click();

I do not get the print statement on the console as well. The button does not get clicked.

Thanks,
Sujata
Reply | Threaded
Open this post in threaded view
|

Re: How to ignore hidden frames in Webdriver

softwaretestingforum
Administrator
Do you encounter any exception eventually? Also which version of WebDriver are you using?
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: How to ignore hidden frames in Webdriver

sujata
No exception. There is no operation performed, so have to stop the test run.
Webdriver version is 2.21.0