xpath expressions broken in Android WebDriver?

154 views
Skip to first unread message

confusa

unread,
May 1, 2012, 9:14:04 PM5/1/12
to Selenium Users
Used xpath successfully in the past with the Android Webdriver client
but now it appears it no longer works. This was actually using a
select which seems to use xpath:
Select select = new Select(driver.findElement(By.id(navSelect)));
select.selectByVisibleText(name);

Seeing this kind of thing in the logs:

org.openqa.selenium.WebDriverException: Error: {"message":"Unable to
locate elements with the xpath expression .\/\/option[normalize-
space(.) = \"My Link\"] because of the following error:\nTypeError:
Result of expression 'd.evaluate' [undefined] is not a function."}
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Linux', os.arch: 'armv5tejl', os.version:
'2.6.29-00261-g0097074-dirty', java.version: '0'
Driver info: driver.version: AndroidWebDriver; duration or timeout:
691 milliseconds
Build info: version: '2.13.0', revision: '14793', time: '2011-11-18
13:16:47'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version:
'10.6.8', java.version: '1.6.0_31'
Driver info: driver.version: RemoteWebDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:
27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:
147)
at
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:
113)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:
416)
at
org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:
231)
at
org.openqa.selenium.remote.RemoteWebElement.findElements(RemoteWebElement.java:
161)
at
org.openqa.selenium.remote.RemoteWebElement.findElementsByXPath(RemoteWebElement.java:
211)
at org.openqa.selenium.By$ByXPath.findElements(By.java:333)
at
org.openqa.selenium.remote.RemoteWebElement.findElements(RemoteWebElement.java:
146)
at
org.openqa.selenium.support.ui.Select.selectByVisibleText(Select.java:
113)

Aniket Gadre

unread,
May 2, 2012, 3:20:11 AM5/2/12
to seleniu...@googlegroups.com
Yes. Even I have observed the same. Xpath no more works on Android


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.




--
Best Regards,
Aniket Gadre
Test Automation Lead
Amdocs , Pune.
E-add: aniket...@amdocs.com

supriya singla

unread,
May 2, 2012, 3:31:47 AM5/2/12
to seleniu...@googlegroups.com
Xpaths are working well on Android Froyo.
Message has been deleted
Message has been deleted

confusa

unread,
May 2, 2012, 5:10:48 PM5/2/12
to Selenium Users
Oh, now I see the open issue for the select:
http://code.google.com/p/selenium/issues/detail?id=2213

supriya singla

unread,
May 3, 2012, 1:45:05 AM5/3/12
to seleniu...@googlegroups.com
APK 2.6.0 and selenium version is  again same i.e. 2.6.0 jars

On Wed, May 2, 2012 at 8:13 PM, confusa <materia...@gmail.com> wrote:
What APK and Selenium version is working for you?


On May 2, 12:31 am, supriya singla <singla.supriy...@gmail.com> wrote:
> Xpaths are working well on Android Froyo.
>
>
>
>
>
>
>
> On Wed, May 2, 2012 at 12:50 PM, Aniket Gadre <aniket....@gmail.com> wrote:
> > Yes. Even I have observed the same. Xpath no more works on Android
>
Reply all
Reply to author
Forward
0 new messages