ericmckean / chromedriver

Automatically exported from code.google.com/p/chromedriver
0 stars 0 forks source link

Switching driver from frame back to defaultContent causes IllegalAccessError #965

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
See http://goo.gl/ll2FvQ for common issues.

Issue Description:
We have several tests that involve ckEditor. In order to interact with the 
editor, we have to use driver.switchTo.frame(), however just recently (I think 
with the most recent Chrome update) switching back to defaultContent causes 
this error:

java.lang.IllegalAccessError: tried to access field 
com.google.gson.JsonNull.INSTANCE from class 
org.openqa.selenium.remote.BeanToJsonConverter
    at org.openqa.selenium.remote.BeanToJsonConverter.convertObject(BeanToJsonConverter.java:93)
    at org.openqa.selenium.remote.BeanToJsonConverter.convertObject(BeanToJsonConverter.java:149)
    at org.openqa.selenium.remote.BeanToJsonConverter.convertObject(BeanToJsonConverter.java:137)
    at org.openqa.selenium.remote.BeanToJsonConverter.convertObject(BeanToJsonConverter.java:84)
    at org.openqa.selenium.remote.BeanToJsonConverter.convert(BeanToJsonConverter.java:64)
    at org.openqa.selenium.remote.http.JsonHttpCommandCodec.encode(JsonHttpCommandCodec.java:193)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:163)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:66)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:572)
    at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:508)

Steps to reproduce:

It's essentially this:

WebElement active = we.findElement(By.cssSelector("iframe[title*='editor']"));
driver.switchTo.frame(active);
driver.switchTo().defaultContent();

Let me know if I can provide more information. Thanks!

Original issue reported on code.google.com by d...@paloalto.com on 31 Oct 2014 at 12:39

GoogleCodeExporter commented 9 years ago
Should have added that I'm using Chrome Version 38.0.2125.111

Original comment by d...@paloalto.com on 31 Oct 2014 at 5:47

GoogleCodeExporter commented 9 years ago
There's a workaround for this issue, so I'm not as panicked as I was before.
driver.switchTo().parentFrame() works in the cases I need it to.
I do still believe the above issue is a bug, though it may only apply to the 
current version of Chrome (38.0.2125.111).

Original comment by d...@paloalto.com on 5 Nov 2014 at 5:34

GoogleCodeExporter commented 9 years ago

Original comment by andrewch...@chromium.org on 21 Nov 2014 at 10:21

GoogleCodeExporter commented 9 years ago
Can not reproduce it with the following set up
Google Chrome   39.0.2171.65 (Official Build) m
ChromeDriver 2.12
let us know if are still having  problem.

Original comment by andrewch...@chromium.org on 21 Nov 2014 at 10:52

GoogleCodeExporter commented 9 years ago
I don't think you need work around.  Let's reproduce the case.

Original comment by andrewch...@chromium.org on 3 Dec 2014 at 1:30

GoogleCodeExporter commented 9 years ago

Original comment by andrewch...@chromium.org on 20 Jan 2015 at 11:12

GoogleCodeExporter commented 9 years ago

Original comment by samu...@chromium.org on 21 Feb 2015 at 12:26