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

Unknown context endpoint when running with WebdriverIO #121

Open
r-byondlabs opened this issue Dec 2, 2024 · 2 comments
Open

Unknown context endpoint when running with WebdriverIO #121

r-byondlabs opened this issue Dec 2, 2024 · 2 comments

Comments

@r-byondlabs
Copy link

Hi, I'm testing with WebdriverIO JS with the following capabilites (as mentioned in the example)

    capabilities: [{
        platformName: 'windows',
        'appium:automationName': 'FlaUI',
        'appium:app': 'myapp.exe',
    }],

The webdriverio uses getContext() to hit http://localhost:4723/session/xxxx/context which isn't implemented. I understand this is needed for webview within native context (https://appium.io/docs/en/2.0/guides/context) and isn't applicable here, but how do I indicate that to webdriverio?

@aristotelos
Copy link
Collaborator

aristotelos commented Dec 13, 2024

Do you get an error from WebDriverIO because that endpoint is not supported? If so, could you share the error details?

@r-byondlabs
Copy link
Author

r-byondlabs commented Dec 13, 2024

Started FlaUI as .\FlaUI.WebDriver.exe --urls=http://localhost:4723/. The wdio.conf.js driver config is the same as I mentioned above.

Output from wdio run wdio.conf.js

[...]
[0-0] 2024-12-13T17:34:53.204Z INFO webdriver: Initiate new session using the WebDriver protocol
[0-0] 2024-12-13T17:34:53.205Z INFO @wdio/utils: Connecting to existing driver at http://localhost:4723/
[0-0] 2024-12-13T17:34:53.212Z INFO webdriver: [POST] http://localhost:4723/session
[0-0] 2024-12-13T17:34:53.212Z INFO webdriver: DATA {
[0-0]   capabilities: {
[0-0]     alwaysMatch: {
[0-0]       platformName: 'Windows',
[0-0]       'appium:automationName': 'FlaUI',
[0-0]       'appium:app': 'myapp.exe'
[0-0]     },
[0-0]     firstMatch: [ {} ]
[0-0]   }
[0-0] }
[0-0] 2024-12-13T17:34:53.316Z INFO webdriver: COMMAND getContext()
[0-0] 2024-12-13T17:34:53.317Z INFO webdriver: [GET] http://localhost:4723/session/bd7d0d21-f815-40fa-8bc1-e51295efe0e6/context
[0-0] 2024-12-13T17:34:53.322Z WARN webdriver: WebDriverError: Unknown command when running "context" with method "GET"
[0-0] 2024-12-13T17:34:53.322Z INFO webdriver: Retrying 1/3
[0-0] 2024-12-13T17:34:53.322Z INFO webdriver: [GET] http://localhost:4723/session/bd7d0d21-f815-40fa-8bc1-e51295efe0e6/context
[0-0] 2024-12-13T17:34:53.829Z WARN webdriver: WebDriverError: Unknown command when running "context" with method "GET"
[...]
[0-0] 2024-12-13T17:34:54.844Z ERROR webdriver: WebDriverError: Unknown command when running "context" with method "GET"
[0-0] 2024-12-13T17:34:54.844Z ERROR @wdio/runner: unknown command: WebDriverError: Unknown command when running "context" with method "GET"

The wdio command fails after that.

This is the output from FlaUIWebDriver:

info: FlaUI.WebDriver.Controllers.SessionController[0]
      Created session with ID 387aa35f-be69-4292-80b6-396fd3cce7df and capabilities FlaUI.WebDriver.MergedCapabilities
fail: FlaUI.WebDriver.NotFoundMiddleware[0]
      Unknown endpoint /session/387aa35f-be69-4292-80b6-396fd3cce7df/context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants