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

Android WebDriver doesn't support CSS selectors (2.0b2) #1420

Closed
lukeis opened this issue Mar 2, 2016 · 28 comments
Closed

Android WebDriver doesn't support CSS selectors (2.0b2) #1420

lukeis opened this issue Mar 2, 2016 · 28 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 2, 2016

Originally reported on Google Code with ID 1420

Env:
Server = Android 2.3 with android-server-2.0b2.apk
Client = Selenium 2.0b2 on Windows 7
Language = C#

Code:
driver.FindElement(By.CssSelector("#id");

Expected result:
Finds the element by css selector (works in other browsers).

Actual Result:
Element not found exception.

Reported by matthew.p.kelly on 2011-03-18 12:16:34

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by berrada@google.com on 2011-06-20 22:05:38

  • Status changed: Accepted

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Looks like it's not just CSS selectors, but id and xpath, too. Using this code (Java,
w/android driver 2.0.2rc3):

     //WebDriver driver = new FirefoxDriver();                                    

     WebDriver driver = new AndroidDriver();                                      



     driver.get( "http://www.google.com" );                                       

     System.out.println( "Page title is " + driver.getTitle() );                  



    WebElement element = driver.findElement(                                      

        //By.id("hplogo" )
        //By.cssSelector("#hplogo")
        By.xpath("//*[@id='hplogo']")                                             

    );                                                                            

    System.out.println( "Found element for header" );                             


    driver.quit();

When using the Firefox driver, each of the selectors works.  Under the Android driver,
they all throw an ElementNotFound exception.

Reported by tmurray978 on 2011-07-01 13:35:02

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

i do all according to the instruction. forwarded the port. but selenium in build path
turn on the webdriver and jetty inside the emulator. but when i run the code in eclipse
then i am getting this following error. plz help me get out of this.....

org.openqa.selenium.UnsupportedCommandException: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 404 Not Found</title>
</head>
<body>
<h2>HTTP ERROR: 404</h2>
<p>Problem accessing /wd/hub/session. Reason:
<pre>    Not Found</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>


</body>
</html>

Build info: version: '2.0.0', revision: '12817', time: '2011-07-07 19:14:34'
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version:
'1.6.0_25'
Driver info: driver.version: AndroidDriver
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.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:131)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:105)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:402)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:101)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:84)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:92)
    at org.openqa.selenium.android.AndroidDriver.<init>(AndroidDriver.java:55)
    at org.openqa.selenium.android.AndroidDriver.<init>(AndroidDriver.java:47)
    at test.OneTest.testGoogle(OneTest.java:12)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at junit.framework.TestCase.runTest(TestCase.java:168)
    at junit.framework.TestCase.runBare(TestCase.java:134)
    at junit.framework.TestResult$1.protect(TestResult.java:110)
    at junit.framework.TestResult.runProtected(TestResult.java:128)
    at junit.framework.TestResult.run(TestResult.java:113)
    at junit.framework.TestCase.run(TestCase.java:124)
    at junit.framework.TestSuite.runTest(TestSuite.java:232)
    at junit.framework.TestSuite.run(TestSuite.java:227)
    at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Reported by niloy.cit1 on 2011-07-09 06:15:26

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Is there an ETA?  Still not working with 2.6.0.  Thanks

Reported by jmchow@linkedin.com on 2011-09-13 21:50:26

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I'll take a look and try to get a fix in for next week

Reported by berrada@google.com on 2011-09-13 21:53:50

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Thanks!  We're looking forward to it!

Reported by jmchow@linkedin.com on 2011-09-13 21:59:09

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

What is the status of this issue? Is here any progress? Thanks.

Reported by jan.papousek on 2011-09-29 07:37:17

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

solved ;)

Reported by niloy.cit1 on 2011-09-29 07:42:58

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

So, I have some error in my project. I am using android-server.apk built from trunk
and selenium-java in version 2.7.0 downloaded by maven.

When I try to call webdriver.findElement(By.cssSelector(...)), the code throws WebDriverException
(Driver does not support finding an element by selector:...).

The whole trace is here:

org.openqa.selenium.WebDriverException: Driver does not support finding elements by
selector: input
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: EventFiringWebDriver; duration or timeout: 281 milliseconds
Build info: version: '2.7.0', revision: '13926', time: '2011-09-23 15:09:51'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.40.3-0.fc15.x86_64',
java.version: '1.6.0_22'
Driver info: driver.version: RemoteWebDriver
    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:532)
    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:397)
    at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:193)
    at org.openqa.selenium.remote.RemoteWebDriver.findElementsByCssSelector(RemoteWebDriver.java:251)
    at org.openqa.selenium.By$ByCssSelector.findElements(By.java:411)
    at org.jboss.test.selenium.By.findElements(By.java:113)
    at org.openqa.selenium.By.findElement(By.java:160)
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:174)
    at org.richfaces.tests.showcase.ftest.webdriver.ftest.a4jAjax.TestA4jAjaxSimple.testType(TestA4jAjaxSimple.java:53)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:691)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:883)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1208)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:753)
    at org.testng.TestRunner.run(TestRunner.java:613)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:335)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:330)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:292)
    at org.testng.SuiteRunner.run(SuiteRunner.java:241)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1169)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1094)
    at org.testng.TestNG.run(TestNG.java:1006)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:107)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:199)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:170)
Caused by: org.openqa.selenium.WebDriverException: Driver does not support finding
elements by selector: input
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: EventFiringWebDriver
Build info: version: '2.7.0', revision: '13926', time: '2011-09-23 15:09:51'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.40.3-0.fc15.x86_64',
java.version: '1.6.0_22'
Driver info: driver.version: EventFiringWebDriver
    at org.openqa.selenium.By$ByCssSelector.findElements(By.java:415)
    at org.openqa.selenium.android.AndroidDriver.findElements(AndroidDriver.java:172)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:521)
    at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:98)
    at $Proxy1.findElements(Native Method)
    at org.openqa.selenium.support.events.EventFiringWebDriver.findElements(EventFiringWebDriver.java:166)
    at org.openqa.selenium.remote.server.handler.FindElements.call(FindElements.java:50)
    at org.openqa.selenium.remote.server.handler.FindElements.call(FindElements.java:1)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
    at java.util.concurrent.FutureTask.run(FutureTask.java:137)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
    at java.lang.Thread.run(Thread.java:1096)

I don't know what I am doing wrong.

Reported by jan.papousek on 2011-09-29 09:24:48

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I think it's because this issue has not been fixed/solved (despite comment9): Android
WebDriver doesn't support CSS selectors.
It would be good if project member could fix:
Comment 6 by project member berr...@google.com, Sep 13, 2011
I'll take a look and try to get a fix in for next week

How is the fix looking?  Thanks

Reported by jmchow@linkedin.com on 2011-09-29 21:57:33

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

i am seeing the exact same issue as in comment 4 with selenium web driver 2.7 and android-server-2.6.0.apk.
i am running this on a 64 bit linux. help me solve this problem i am seeing a comment
which says solved... what is the fix for this issue?

Reported by jothiprasad on 2011-10-05 04:21:50

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by barancev on 2011-10-12 20:31:50

  • Labels added: Component-WebDriver, Browser-Android

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

This is fixed in r14236. It will be in the next apk release.

Reported by berrada@google.com on 2011-10-19 00:35:38

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by berrada@google.com on 2011-10-19 20:56:02

  • Status changed: Fixed

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

First of all android-server2.9.apk doesnt work on emuluator or device to run our test.
I couldn,t even find out what was the error as logging issue os port forward. So i
had to remove the apk and reinstall in android-server.apk 2.6 which works fine but
still facing this problem saying "WebDriver exception, driver doesn't support finiding
elements by CSS "

org.openqa.selenium.WebDriverException: Driver does not support finding an element
by selector: .first_name>input
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: EventFiringWebDriver; duration or timeout: 257 milliseconds
Build info: version: '2.6.0', revision: '13840', time: '2011-09-13 14:55:47'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.38-11-generic', java.version:
'1.6.0_26'
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:397)
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:182)
    at org.openqa.selenium.remote.RemoteWebDriver.findElementByCssSelector(RemoteWebDriver.java:247)
    at org.openqa.selenium.By$ByCssSelector.findElement(By.java:401)
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:174)
    at com.pontiflex.webview.browser.MultipageTest.fiveDigitsZipCode(MultipageTest.java:14)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.openqa.selenium.WebDriverException: Driver does not support finding
an element by selector: .first_name>input
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: EventFiringWebDriver
Build info: version: '2.6.0', revision: '13840', time: '2011-09-13 14:55:47'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.38-11-generic', java.version:
'1.6.0_26'
Driver info: driver.version: EventFiringWebDriver
    at org.openqa.selenium.By$ByCssSelector.findElement(By.java:404)
    at org.openqa.selenium.android.AndroidDriver.findElement(AndroidDriver.java:158)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:521)
    at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:98)
    at $Proxy1.findElement(Native Method)
    at org.openqa.selenium.support.events.EventFiringWebDriver.findElement(EventFiringWebDriver.java:177)
    at org.openqa.selenium.remote.server.handler.FindElement.call(FindElement.java:48)
    at org.openqa.selenium.remote.server.handler.FindElement.call(FindElement.java:1)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
    at java.util.concurrent.FutureTask.run(FutureTask.java:137)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
    at java.lang.Thread.run(Thread.java:1096)


Reported by qatseay on 2011-10-26 15:11:13

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by berrada@google.com on 2011-10-26 16:36:03

  • Status changed: Accepted

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Would you please let me know if the problem has been solved as i saw selenium server
2.10 is deployed.
Thanks
RP

Reported by qatseay on 2011-10-28 15:15:15

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

The new apk, 2.11.0 is released, please take a look at our download page.

Reported by berrada@google.com on 2011-10-28 17:15:36

  • Status changed: Fixed

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

could n,t make it work. I faced this problem before. I am using Ubuntu-11.04,junit 4.9
,Selenium-server-2.11, android driver.apk 2.11 , android emulation version 2.3.3 as
i couldnt even install android-server 2.11 from command to other version of android
emulator or device, its giving me error like device not found. but i was able to install
the 2.11 apk to 2.3.3 android emulator.

When i tried to run test , i see following error

org.openqa.selenium.WebDriverException: Cannot create temp directory: /sdcard/1319829722256
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: unknown; duration or timeout: 348 milliseconds
Build info: version: '2.11.0', revision: '14431', time: '2011-10-28 16:28:32'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.38-11-generic', java.version:
'1.6.0_26'
Driver info: driver.version: AndroidDriver
    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:417)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:115)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:76)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:84)
    at org.openqa.selenium.android.AndroidDriver.<init>(AndroidDriver.java:70)
    at org.openqa.selenium.android.AndroidDriver.<init>(AndroidDriver.java:58)
    at com.pontiflex.webview.browser.BaseScript.start(BaseScript.java:24)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:69)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:48)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:292)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.openqa.selenium.WebDriverException: Cannot create temp directory: /sdcard/1319829722256
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: unknown
Build info: version: '2.11.0', revision: '14431', time: '2011-10-28 16:28:32'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.38-11-generic', java.version:
'1.6.0_26'
Driver info: driver.version: unknown
    at org.openqa.selenium.remote.server.DefaultSession.createSession(DefaultSession.java:82)
    at org.openqa.selenium.remote.server.DefaultDriverSessions.newSession(DefaultDriverSessions.java:87)
    at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:48)
    at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:188)
    at org.openqa.selenium.remote.server.DriverServlet.handleRequest(DriverServlet.java:555)
    at org.openqa.selenium.remote.server.DriverServlet.doPost(DriverServlet.java:492)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.openqa.selenium.remote.server.DriverServlet.service(DriverServlet.java:459)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:533)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:475)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:920)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:856)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
    at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:47)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
    at org.eclipse.jetty.server.Server.handle(Server.java:352)
    at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596)
    at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1066)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:805)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)
    at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450)
    at java.lang.Thread.run(Thread.java:1019)

java.lang.NullPointerException
    at com.pontiflex.webview.browser.BaseScript.teardOWN(BaseScript.java:28)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:37)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:69)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:48)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:292)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)


Reported by qatseay on 2011-10-28 19:40:22

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I think this is a bug on android emulator 2.3.Can you try on another emulator version,
preferrably ICS? Or you could try on a real device running 2.3.

Reported by berrada@google.com on 2011-10-28 20:21:09

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Just installed it on android 4.0 emulator...:D but still facing following problem  :(

org.openqa.selenium.WebDriverException: Cannot create temp directory: /sdcard/1319834106690
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Linux', os.arch: 'armv7l', os.version: '2.6.29-g327fbfb', java.version:
'0'
Driver info: driver.version: unknown; duration or timeout: 935 milliseconds
Build info: version: '2.11.0', revision: '14431', time: '2011-10-28 16:28:32'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.38-11-generic', java.version:
'1.6.0_26'
Driver info: driver.version: AndroidDriver
    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:417)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:115)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:76)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:84)
    at org.openqa.selenium.android.AndroidDriver.<init>(AndroidDriver.java:70)
    at org.openqa.selenium.android.AndroidDriver.<init>(AndroidDriver.java:58)
    at com.pontiflex.webview.browser.BaseScript.start(BaseScript.java:24)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.openqa.selenium.WebDriverException: Cannot create temp directory: /sdcard/1319834106690
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Linux', os.arch: 'armv7l', os.version: '2.6.29-g327fbfb', java.version:
'0'
Driver info: driver.version: unknown
Build info: version: '2.11.0', revision: '14431', time: '2011-10-28 16:28:32'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.38-11-generic', java.version:
'1.6.0_26'
Driver info: driver.version: unknown
    at org.openqa.selenium.remote.server.DefaultSession.createSession(DefaultSession.java:82)
    at org.openqa.selenium.remote.server.DefaultDriverSessions.newSession(DefaultDriverSessions.java:87)
    at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:48)
    at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:188)
    at org.openqa.selenium.remote.server.DriverServlet.handleRequest(DriverServlet.java:555)
    at org.openqa.selenium.remote.server.DriverServlet.doPost(DriverServlet.java:492)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.openqa.selenium.remote.server.DriverServlet.service(DriverServlet.java:459)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:533)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:475)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:920)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:856)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
    at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:47)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
    at org.eclipse.jetty.server.Server.handle(Server.java:352)
    at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596)
    at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1066)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:805)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)
    at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450)
    at java.lang.Thread.run(Thread.java:856)

java.lang.NullPointerException
    at com.pontiflex.webview.browser.BaseScript.teardOWN(BaseScript.java:28)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:36)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)


Reported by qatseay on 2011-10-28 20:44:19

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Can you capture the logcat and attach it to this bug?

To get the logcat, cd into your sdk directory
$cd platform-tools
$./adb logcat

Run the tests and capture the output. That will be of great help to debug this.

Thanks,

Reported by berrada@google.com on 2011-10-28 20:52:23

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I think its fort forward issue on android-server.apk 2.11 i tried both version of on
different different emulator , same test works on 2.6 apk but when i run it on 2.11
apk, it stop working and giving error above i mentioned earlier.

Reported by qatseay on 2011-10-28 21:36:06


- _Attachment: snapshot1.png
![snapshot1.png](https://storage.googleapis.com/google-code-attachments/selenium/issue-1420/comment-24/snapshot1.png)_

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I did some digging and it seems that this means that the emulator you are running your
tests on does not have SD card storage allocated. Edit your emulator setting and ensure
that the SD card storage is set(you can it to 64mb).

Reported by berrada@google.com on 2011-10-28 22:51:42

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

You are the best..!! Working great with Android 4.0 , selenium server 2.11 and android-server
2.11 .apk

Thanks
RP

Reported by qatseay on 2011-10-31 14:54:52

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Just one quick question, tests are too slow when we run it on Emulator or device using
CSS locator. My tests are running slow FAQ ans mentioned about "Avoid looking up elements
by XPath, it is by far more expensive than using IDs or name." but noting about css
locator. Tests are running slow is it because of css locator?

Reported by qatseay on 2011-11-22 23:21:39

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Can you compare the performance of css versus id? Which emulator version are you running?

Reported by berrada@google.com on 2011-11-23 00:01:53

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by luke.semerau on 2015-09-17 18:12:30

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 2, 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