Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this support webdriverio with appium? #11

Closed
DevKhaira opened this issue Oct 5, 2020 · 2 comments
Closed

Does this support webdriverio with appium? #11

DevKhaira opened this issue Oct 5, 2020 · 2 comments
Labels
status: archived Archived and locked; will not be updated type: question A question from the community

Comments

@DevKhaira
Copy link

DevKhaira commented Oct 5, 2020

HI there,

I've been trying to get this to work with WDIO and Appium and get the following error messages on the node

Session ID df2ab128dc932a04cb96614c3ef2a5d6 created
12:02:03.519 INFO [ProtocolHandshake.createSession] - Detected dialect: W3C
12:02:04.120 INFO [ResultConfig.handle] - Executing: [find element: By.cssSelector: [data-test-id="5"]])
POST /session/df2ab128dc932a04cb96614c3ef2a5d6/element { value: '[data-test-id="5"]', using: 'css selector' }
12:02:04.169 ERROR [FindElement.call] - Unexpected exception during findElement
org.openqa.selenium.UnsupportedCommandException: An unknown error has occurred
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'UKC02QK85KG8WN', ip: 'fe80:0:0:0:c8d:a184:cc6f:263c%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '12.0.1'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities {javascriptEnabled: true, platform: ANY, platformName: ANY}
Session ID: df2ab128dc932a04cb96614c3ef2a5d6
*** Element info: {Using=css selector, value=[data-test-id="5"]}
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:323)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByCssSelector(RemoteWebDriver.java:420)
at org.openqa.selenium.By$ByCssSelector.findElement(By.java:431)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:315)
at org.openqa.selenium.remote.server.handler.FindElement.call(FindElement.java:49)
at org.openqa.selenium.remote.server.handler.FindElement.call(FindElement.java:32)
at org.openqa.selenium.remote.server.handler.WebDriverHandler.handle(WebDriverHandler.java:41)
at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:125)
at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:200)
at org.openqa.selenium.remote.server.InMemorySession.execute(InMemorySession.java:84)
at org.openqa.selenium.remote.server.WebDriverServlet.lambda$handle$0(WebDriverServlet.java:235)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:835)

My setup for the node is

java \
  -Dgenericwebdriver.browser.name=tizen \
  -Dgenericwebdriver.backend.exe=node_modules/tizen-webdriver-server/tizen-webdriver-server.js\
  -Dgenericwebdriver.backend.params.hostname=192.168.0.26:26101\
  -Dgenericwebdriver.backend.params.local-tizen-studio=true\
  -Dgenericwebdriver.backend.params.wake-on-lan-address=true\
  -Dgenericwebdriver.backend.params.tizen-studio-path=../../../../../../tizen-studio\
  -Dgenericwebdriver.backend.params.tizen-studio-author-profile=dkh10\
  -cp node_modules/generic-webdriver-server/GenericWebDriverProvider.jar:node_modules/generic-webdriver-server/selenium-server-standalone-3.141.59.jar \
  org.openqa.grid.selenium.GridLauncherV3 \.

(The same thing occurs if I use i remove local-tizen studio, tizen-studio-path, tizen-studio-author-profile

The wdio config i use is

 services: [
    [
      [
        'appium',
        {
          logPath: './',
          command: 'appium',
          args: {
            // ...
            'show-config': true,
            debugLogSpacing: true,
            platformName: 'tizen',
            deviceName: 'smarttv',
            port: '5555',
            'bootstrap-port': '5555',
            // ...
          },
        },
      ],
    ],
  ],
  capabilities: [
    {
      browserName: 'tizen',
      port: 5555,
    },
  ]

Thank you for reading this, I hope there is a way, that would be pretty awesome :)

@joeyparrish
Copy link
Member

Here's the relevant bit from your logs:

12:02:04.169 ERROR [FindElement.call] - Unexpected exception during findElement
org.openqa.selenium.UnsupportedCommandException: An unknown error has occurred

We have never tried to use this with webdriverio or appium, but what I see here is more fundamental and has nothing to do with either of those: We don't support findElement.

Here's are relevant parts of our README, with emphasis added:

A generic WebDriver server framework and base class, implementing the subset of the WebDriver protocol necessary for Karma.

...

Intended audience

  • Projects using something like Karma for testing with a Selenium grid
    • If your test runner uses WebDriver to point browsers back to a URL,
      this subset of the WebDriver protocol can expand your grid to new
      devices
  • Not for testing via WebDriver directly
    • If you use a WebDriver client directly in your tests, this probably
      won't help you
    • Does not support element interaction or script injection
    • Screenshots may be supported on certain platforms

I'm sorry that our project doesn't seem to be a good fit for your tests.

If you have any expertise on the target platform, there's always room for expansion. The base class can be extended to support any part of the WebDriver protocol if you can find some way to, for instance, implement element-based interactions on Tizen.

Does this help?

@joeyparrish joeyparrish added the type: question A question from the community label Nov 30, 2020
@joeyparrish
Copy link
Member

Closing due to inactivity. Thanks!

@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Sep 28, 2021
@shaka-project shaka-project locked and limited conversation to collaborators Sep 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: question A question from the community
Projects
None yet
Development

No branches or pull requests

3 participants