jBrowserDriver icon indicating copy to clipboard operation
jBrowserDriver copied to clipboard

Unable switch to frame

Open w3ea opened this issue 8 years ago • 5 comments

hi when i want to switch another frame Jbrowser stuck and hang this is my code: driver.switchTo().frame(driver.findElement(By.cssSelector("iframe[title='recaptcha widget']"))); OR even with frame's name driver.switchTo().frame("undefined");

w3ea avatar Jan 09 '17 00:01 w3ea

If the frame's name is "undefined" it's possible that the frame doesn't yet exist when the switchTo call is made. For purposes of this issue, maybe check if it's there by taking a screenshot first or running in non-headless mode.

hollingsworthd avatar Jan 10 '17 00:01 hollingsworthd

ok i check that but this code work in chromedriver and in chromedriver when a frame doesn't exist it show error in terminal not freezing

w3ea avatar Jan 10 '17 07:01 w3ea

I seem to be experiencing a very similar issue. When I attempt to switch the frame the next find element call hangs indefinitely.
driver.switchTo().frame("e1menuAppIframe"); driver.findElementByXPath("//div[@title='Alpha Name']");

The switch seems to execute but the findElementByXPath hangs.

fickmj avatar Jul 14 '17 17:07 fickmj

Any update on this issue? I see it is still apparent.

svsik avatar Jun 07 '18 13:06 svsik

Hi All,

I was facing the same issue And in order to navigate between frames I used the following solution

I've wrote a method that receive a WebElement and then send the 'name' attribute to the frame() method. Like this, frame is my WebElement, driver.switchTo().frame(frame.getAttribute("name"));

I hope it could be useful for someone.

Thanks Guilherme Leindecker

leindecker avatar Aug 16 '18 14:08 leindecker