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

synchronous REPL mode? #606

Open
jrr opened this issue Sep 25, 2019 · 0 comments
Open

synchronous REPL mode? #606

jrr opened this issue Sep 25, 2019 · 0 comments

Comments

@jrr
Copy link

jrr commented Sep 25, 2019

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.

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

1 participant