SeleniumHQ / selenium-google-code-issue-archive

Archive, please see main selenium repo
https://github.com/seleniumhq/selenium
345 stars 195 forks source link

Advanced User interactions-Connectivity Issues #5779

Closed lukeis closed 8 years ago

lukeis commented 8 years ago

Originally reported on Google Code with ID 5779

Hello,

i am trying to automate a web app using android web driver .I installed it on my Android
webdriver 2.21 on my device .Created a smal script and was able to run it suvccessfully.

Now I had add some advanced useer interactions like doubletap,scroll etcc.
So I wrote the following code 

Actions builder = new Actions(driver);
builder.doubleClick(mac).build().perform();

But on running,this gives an exception that "the underlying driver does not support
advanced user interactions"

So,I updated the Android webdriver to 2.32 version .And now ,if I run the same code
.I get the following exception

Selenium version:
OS:windows 7
Browser:Firefox
Browser version:14

org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the
remote browser. It may have died.
Build info: version: '2.25.0', revision: '17482', time: '2012-07-18 21:08:56'
System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version:
'1.6.0_31'
Driver info: driver.version: RemoteWebDriver
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:493)
    at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:242)
    at Apple4.testApple4(Apple4.java:41)
    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 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.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: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.runners.ParentRunner.run(ParentRunner.java:300)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
    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.apache.http.NoHttpResponseException: The target server failed to respond
    at org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:101)
    at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:252)
    at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:281)
    at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:247)
    at org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:216)
    at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:298)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
    at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:647)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:464)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
    at org.openqa.selenium.remote.HttpCommandExecutor.fallBackExecute(HttpCommandExecutor.java:337)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:297)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:472)
    ... 27 more

Please help me out with this....Where is the isssue..Which version of android web driver
supports advanced user interactions and why 2.32 is having connectivity issues.?

Reported by inderpreetsingh31 on 2013-06-14 11:16:46

lukeis commented 8 years ago

Reported by barancev on 2013-06-14 13:26:37

lukeis commented 8 years ago
Any updates on this?

Thanks.

Reported by inderpreetsingh31 on 2013-06-17 05:27:50

lukeis commented 8 years ago
Hi!

Have you tried using TouchActions?
An example below:

      IWebElement element = driver.FindElement(By.Name("q"));
      TouchActions touchAction = new TouchActions(driver);
      touchAction.DoubleTap(element).Perform();

If the element can be toubletapped then it should be working. Please let me know if
this worked for you or not!

Reported by pete07nik on 2013-11-15 12:35:57

lukeis commented 8 years ago
Selenium project no longer supports the AndroidDriver.

Please use Selendroid instead:
http://selendroid.io/webview.html

And log any issues against that project:
https://github.com/selendroid/selendroid/issues

Reported by luke.semerau on 2013-12-26 21:57:36

lukeis commented 8 years ago

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