After an app reset command, the protocol is switched from W3C to MJSONWP.
See original GitHub issueThe problem
Given a session started with W3C capabilities, when I run an app reset command, then the protocol is switched from W3C to MJSONWP.
Environment
- Appium version (or git revision) that exhibits the issue: 1.8.2-beta
- Last Appium version that did not exhibit the issue (if applicable): unknown
- Desktop OS/version used to run Appium: Mac
- Node.js version (unless using Appium.app|exe): 8.11.1
- Mobile platform/version under test: iOS
- Real device or emulator/simulator: Simulator
- Appium CLI or Appium.app|exe: CLI
Details
It seems that after the reset command, when creating the new session, it uses the same capabilities but does not end up with the same protocol being chosen. This can cause a problem on the client side if the client is expecting responses conforming to the W3C style.
Link to Appium logs
https://gist.github.com/studuffy/30697ec560769fc25055d2676d450ff4
Code To Reproduce Issue [ Good To Have ]
Create a W3C session:
curl -X "POST" "http://localhost:4723/wd/hub/session" \
-H 'Content-Type: application/json' \
-d $'{
"capabilities": {
"alwaysMatch": {
"platformName": "iOS",
"showXcodeLog": true,
"app": "{path_to_app}",
"deviceName": "Simulator",
"platformVersion": "11.4",
"udid": "{valid_udid}",
"processArguments": {
"args": [
"ClearKeychain"
]
},
"automationName": "XCUITest",
"language": "de"
}
}
}'
Then reset the app:
curl -X "POST" "http://localhost:4723/wd/hub/session/{session_id}/appium/app/reset" \
-H 'Content-Type: application/json'
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
How to turn off w3c in chromedriver to address the error ...
First the solution. As promised by John Chen [Owner - WebDriver for Google Chrome] yesterday, new versions of ChromeDriver 75.0.3770.90 and ...
Read more >Is there a way to continue using the session before restarting ...
For testing, I always need to close the program by ctrl+c , and then re-run node test.js . At this time, the APP...
Read more >Problem with running 'sample test' in iOS - Katalon Community
[debug] [MJSONWP] Responding to client with driver. ... are missing in W3C capabilities: [“app”,“automationName”,“deviceName”,“fullReset” ...
Read more >Appium 2.0 migration doc - BrowserStack
Appium 2.0 enforces strict compatibility with the W3C webdriver protocol and deprecates legacy protocols such as JSONWP & MJSONWP protocol.
Read more >WebDriver - W3C
The WebDriver protocol is organized into commands. ... or to continue to send commands after the session has been closed.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There’s a PR for this. Fix will be published today and will be available in appium beta.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.