org.openqa.selenium.WebDriverException: java.lang.String cannot be cast to java.lang.Number
Command duration or timeout: 10.42 seconds
Build info: version: '2.46.0', revision: '61506a4624b13675f24581e453592342b7485d71', time: '2015-06-04 10:22:50'
System info: host: 'jenkins.salmon.ltd.uk', ip: '192.168.219.124', os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-504.el6.x86_64', java.version: '1.7.0_65'
Session ID: 58c2a0e2-477f-49ea-abd5-fb1443fa29e9
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities [{platform=WINDOWS, javascriptEnabled=true, acceptSslCerts=true, browserName=firefox, rotatable=false, locationContextEnabled=true, webdriver.remote.sessionid=58c2a0e2-477f-49ea-abd5-fb1443fa29e9, version=39.0, cssSelectorsEnabled=true, databaseEnabled=true, handlesAlerts=true, webStorageEnabled=true, nativeEvents=false, applicationCacheEnabled=true, takesScreenshot=true}]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:605)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:269)
at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:80)
The method that's being used to wait for an elemen is...
public WebElement waitForExpectedElement(final By by, long waitTimeInSeconds) {
try {
return new WebDriverWait(getWebDriver(), waitTimeInSeconds).until(ExpectedConditions.visibilityOfElementLocated(by));
// return wait.until(ExpectedConditions.visibilityOfElementLocated(by));
} catch (NoSuchElementException e) {
LOG.info(e.getMessage());
return null;
} catch (TimeoutException e) {
LOG.info(e.getMessage());
return null;
}
}
This is happening mostly when i run my test on Remote Machine,