Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

synchronous REPL mode? #606

Open
Open

Description

When I connect the REPL using .remote() like in the example, the commands seem not to return anything.

yarn run wd shell
(...)
(wd): x = wd.remote("localhost",4723)
(... )
(wd): x.init({platformName:"iOS",deviceName:"test-ipad",automationName:"XCUITest",platformVersion:"12.2", app: "./ios/build/MyApp/Build/Products/Debug-iphonesimulator/MyApp.app" })
undefined
(wd): x.contexts()
undefined

At this point I can see in my appium server window that it worked:

[debug] [MJSONWP (a89051aa)] Responding to client with driver.getContexts() result: ["NATIVE_APP","WEBVIEW_30703.2"]
[HTTP] <-- GET /wd/hub/session/a89051aa-c612-4389-9a3e-6999cf12d535/contexts 200 119 ms - 104
[HTTP]

..but the function just returned undefined in the REPL.

Is this supposed to work synchronously?

I'm also able to use wd.promiseChainRemote(), but it's awkward to use promises in the REPL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /