Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

driver.switchTo.activeElement() throws ClassCast exception (IE 10 & 11 especially, 32 bit IEDriver) #132

Closed
irileydev opened this issue Mar 7, 2016 · 4 comments

Comments

@irileydev
Copy link

Summary
Calls to driver.switchTo.activeELement() throws ClassCastExceptions

Setup
WebDriver Java Bindings 2.52.0
Affected Browsers: IE10 & 11 primarily (IEDriver 32 bit)

* Steps to Reproduce*
Attempts to switch to a modal using the call "driver.switchTo().activeElement();" throws the ClassCast Exception. Code snippet ...:

clickElement(driver, xButton); // which is really a call to driver.findElement(By) wrapped with a WebDriverWait
driver.switchTo().activeElement();

Actual Results
After the call to switch to the modal, we get:

java.lang.ClassCastException: com.google.common.collect.Maps$TransformedEntriesMap cannot be cast to org.openqa.selenium.WebElement
at org.openqa.selenium.remote.RemoteWebDriver$RemoteTargetLocator.activeElement(RemoteWebDriver.java:1045)
at com.automatedTesting.redesigned.pageObjects.NotesModal.closeNotesModal(NotesModal.java:87)
at com.automatedTesting.redesigned.testcases.Notes_testAddAcknowledgeButtonPresence.assertAddAcknowledgeBtnAbsence(Notes_testAddAcknowledgeButtonPresence.java:72)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

@irileydev irileydev changed the title driver.switchTo.activeElement throws ClassCast exception (IE 10 & 11 especially) driver.switchTo.activeElement() throws ClassCast exception (IE 10 & 11 especially, 32 bit IEDriver) Mar 7, 2016
@acdcjunior
Copy link
Member

@irileydev I think this problem is related to Selenium directly, no seleniumQuery. Isn't it? If so, this issue is better placed at https://github.com/SeleniumHQ/selenium (because we probably can't do much to work around it through seleniumQuery).

Would you agree?

@irileydev
Copy link
Author

Haha, that's where I filed the issue? Yes, it is for the Selenium HQ; I'l
move it. Thanks.

On Mon, Mar 7, 2016 at 12:41 PM, acdcjunior notifications@github.com
wrote:

@irileydev https://github.com/irileydev I think this problem is related
to Selenium directly, no seleniumQuery. Isn't it? If so, this issue is
better placed at https://github.com/SeleniumHQ/selenium (because we
probably can't do much to work around it through seleniumQuery).

Would you agree?


Reply to this email directly or view it on GitHub
#132 (comment)
.

@acdcjunior
Copy link
Member

I see you filed it at SeleniumHQ/selenium#1759. I'm closing this, ok? Thanks!

@irileydev
Copy link
Author

No prob

On Mon, Mar 7, 2016 at 1:37 PM, acdcjunior notifications@github.com wrote:

Closed #132 #132.


Reply to this email directly or view it on GitHub
#132 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants