I send http call in browser to log out from application and then xml response opens in browser. I need to check tag value in this response.
I search an element by xPath //*[text()='true']
When I launch this test in FF 34.0 with selenium 2.44.0, everything is OK
But when I try in FF 37.0 with selenium 2.45.0 I'm getting the following error:
07:22:47.776 INFO - Executing: [find element: By.xpath: //*[text()='true']])
07:22:47.950 WARN - Exception thrown
org.openqa.selenium.InvalidSelectorException: The given selector //*[text()='true'] is either invalid or does not result in
a WebElement. The following error occurred:
InvalidSelectorError: Unable to locate an element with the xpath expression //*[text()='true'] because of the following err
r:
TypeError: q is null
Command duration or timeout: 7 milliseconds
Build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50'
*** Element info: {Using=xpath, value=//*[text()='true']}
Session ID: 21afcdd7-ffae-453d-8463-3bec9da0532c
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{platform=WINDOWS, acceptSslCerts=true, javascriptEnabled=true, cssSelectorsEnabled=true, databaseEnabled=tru
, browserName=firefox, handlesAlerts=true, nativeEvents=false, webStorageEnabled=true, rotatable=false, locationContextEnab
ed=true, applicationCacheEnabled=true, takesScreenshot=true, version=37.0.1}]
at sun.reflect.GeneratedConstructorAccessor30.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
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:599)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:352)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:449)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:344)
at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:101)
at com.sun.proxy.$Proxy1.findElement(Unknown Source)
at org.openqa.selenium.support.events.EventFiringWebDriver.findElement(EventFiringWebDriver.java:184)
at org.openqa.selenium.remote.server.handler.FindElement.call(FindElement.java:47)
at org.openqa.selenium.remote.server.handler.FindElement.call(FindElement.java:1)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:168)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.openqa.selenium.InvalidSelectorException: The given selector //*[text()='true'] is either invalid or does no
result in a WebElement. The following error occurred:
InvalidSelectorError: Unable to locate an element with the xpath expression //*[text()='true'] because of the following err
r:
TypeError: q is null
Have you any ideas what it could be caused by?
Is this selenium issue or my xPath is really invalid?
Thank you in advance,
Veranika