Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Status-Untriaged
New issue 5043 by
edw...@gmail.com: ClassCastException in RemoteWebElement
http://code.google.com/p/selenium/issues/detail?id=5043
This is a very intermittent problem, but we've seen it happen multiple
times in various suite executions.
Upon executing this code on a disabled element (not sure if that has to do
with it):
java.lang.ClassCastException: java.lang.String cannot be cast to
java.lang.Boolean at
org.openqa.selenium.remote.RemoteWebElement.isSelected(RemoteWebElement.java:132)
at
org.openqa.selenium.support.ui.Select.getAllSelectedOptions(Select.java:79)
at
public boolean isSelected() {
return (Boolean) execute(DriverCommand.IS_ELEMENT_SELECTED,
ImmutableMap.of("id", id))
.getValue();
}
Selenium version: 2.28.0
OS: Windows 7
Browser: Chrome
Browser version: 24.0.1312.52 m
Other stack traces representing the issue collected over several weeks:
java.lang.ClassCastException: java.lang.String cannot be cast to
java.util.List
at
org.openqa.selenium.remote.RemoteWebElement.findElements(RemoteWebElement.java:173)
at
org.openqa.selenium.remote.RemoteWebElement.findElementsByXPath(RemoteWebElement.java:226)
at
org.openqa.selenium.By$ByXPath.findElements(By.java:339)
at
org.openqa.selenium.remote.RemoteWebElement.findElements(RemoteWebElement.java:153)
at org.openqa.selenium.support.ui.Select.selectByValue(Select.java:199)
java.lang.ClassCastException: java.lang.String cannot be cast to
org.openqa.selenium.WebElement
at
org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:304)
at
org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:331)
at
org.openqa.selenium.By$ById.findElement(By.java:216)
at
org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:294)
at
org.openqa.selenium.support.pagefactory.DefaultElementLocator.findElement(DefaultElementLocator.java:59)
at
org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler.invoke(LocatingElementHandler.java:34)
java.lang.ClassCastException: java.lang.String cannot be cast to
java.util.List
at
org.openqa.selenium.remote.RemoteWebDriver.getWindowHandles(RemoteWebDriver.java:416)
java.lang.ClassCastException: java.lang.String cannot be cast to
java.lang.Boolean
at
org.openqa.selenium.remote.RemoteWebElement.isEnabled(RemoteWebElement.java:137)