Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

java.lang.ClassCastException exception while clicking/inputing on any web object #2501

Closed
lukeis opened this issue Mar 3, 2016 · 5 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 3, 2016

Originally reported on Google Code with ID 2501

Hi All,

I am using selenium-java-2.6.0 and firefox 5.0.1.

When i am executing the line "driver.findElement(By.xpath("//*[@id='signIn']")).click();",
it is executing fine.

After i am logging in i need to click on another link. When i attempt to do so i am
getting an exception like "Error java.lang.ClassCastException: com.google.common.collect.Maps$TransformedEntriesMap
cannot be cast to org.openqa.selenium.WebElement"


Reported by prabhatnayak31 on 2011-09-20 10:48:11

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

This excption comes when page changes. Login functionality works fine. It takes some
time to the Main page to get loaded and i have given wait condition. Then i try to
click on a link (I have noticed the link is loaded to the page by then) where i get
the above exception.

Reported by prabhatnayak31 on 2011-09-20 11:02:12

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

reproduced after upgrade to selenium-java-2.6.0 and firefox 6.0.2 (in ff 3.6 get runtime
exception)

Reported by jarosite on 2011-09-21 08:00:03

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Could able to resolve by writing "driver.switchTo().defaultContent();" before the line
where exception was being thrown.

Reported by prabhatnayak31 on 2011-09-21 09:19:43

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Reported by simon.m.stewart on 2011-09-22 10:08:51

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Reported by luke.semerau on 2015-09-17 18:13:46

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 3, 2016
@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant