Skip to content

synchronous REPL mode? #606

Open
Open
@jrr

Description

@jrr

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