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

fix: get active element should proxy #1011

Merged
merged 1 commit into from
Jul 26, 2019

Conversation

KazuCocoa
Copy link
Member

Fix appium/appium#12968

WDA handles get active element as "GET" which is W3C spec. MJSONWP case the method is "POST".
xcuitest-driver has the proxy so MJSONWP case the request should be handled by xcuitest-driver.

https://github.com/appium/appium-xcuitest-driver/blob/master/lib/commands/general.js#L9-L14

e2e test exists, but it can work since it is W3C. (and it works fine)

fixed:

[HTTP] --> POST /wd/hub/session/18c36a40-d1ee-448f-a0d0-8c969b45698d/element/active
[HTTP] {}
[debug] [MJSONWP (18c36a40)] Calling AppiumDriver.active() with args: ["18c36a40-d1ee-448f-a0d0-8c969b45698d"]
[debug] [XCUITest] Executing command 'active'
[debug] [WD Proxy] Matched '/element/active' to command name 'active'
[debug] [WD Proxy] Proxying [GET /element/active] to [GET http://localhost:8100/session/D7785321-1D19-45A4-8850-F1612D73C0F1/element/active] with no body
[debug] [WD Proxy] Got response with status 200: {
[debug] [WD Proxy]   "value" : {
[debug] [WD Proxy]     "ELEMENT" : "1A000000-0000-0000-71EC-000000000000"
[debug] [WD Proxy]   },
[debug] [WD Proxy]   "sessionId" : "D7785321-1D19-45A4-8850-F1612D73C0F1",
[debug] [WD Proxy]   "status" : 0
[debug] [WD Proxy] }
[debug] [MJSONWP (18c36a40)] Responding to client with driver.active() result: {"element-6066-11e4-a52e-4f735466cecf":"1A000000-0000-0000-71EC-000000000000","ELEMENT":"1A000000-0000-0000-71EC-000000000000"}
[HTTP] <-- POST /wd/hub/session/18c36a40-d1ee-448f-a0d0-8c969b45698d/element/active 200 98 ms - 199
[HTTP]

@KazuCocoa KazuCocoa merged commit b26e51d into appium:master Jul 26, 2019
@KazuCocoa KazuCocoa deleted the proxy-mjsonwp-get-element branch July 26, 2019 23:05
khanayan123 pushed a commit to khanayan123/appium-xcuitest-driver that referenced this pull request May 10, 2021
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

Successfully merging this pull request may close these issues.

Get Active Element Func Listed, But Not Implemented
2 participants