Skip to content

Commit 1cd33a3

Browse files
aheermohsinsemeabed
authored andcommitted
Window handler update (#31)
* add require for setwindow and set alert text * update commands for require alerttext, set window and cmd values * update details in appium function file
1 parent 27f4d71 commit 1cd33a3

3 files changed

Lines changed: 45 additions & 23 deletions

File tree

APPIUM_CORE_FUNCTIONS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@
123123
| networkSpeed | POST | /appium/device/network_speed<br>Set Android emulator network speed (mjsonWire). | {"required":["netspeed"]} |
124124
| touchId | POST | /simulator/touch_id<br>Simulate iOS touchID (mjsonWire) | {"required":["match"]} |
125125
| getTimeouts | GET | /timeouts<br>get /wd/hub/session/:sessionid/timeouts | |
126+
| getWindowHandle | GET | /window/handle<br>get /wd/hub/session/:sessionid/window/handle | |
127+
| getWindowHandles | GET | /window/handles<br>get /wd/hub/session/:sessionid/window/handles | |
126128
| postFrameParent | POST | /frame/parent<br>post /wd/hub/session/:sessionid/frame/parent | |
127129
| getWindowHandle | GET | /window<br>get /wd/hub/session/:sessionid/window | |
128130
| getCookie | GET | /cookie/:name<br>get /wd/hub/session/:sessionid/cookie/:name | |
@@ -173,11 +175,10 @@
173175
| getSettings | GET | /appium/settings<br>get /wd/hub/session/:sessionid/appium/settings | |
174176
| appReceiveAsyncResponse | POST | /appium/receive_async_response<br>post /wd/hub/session/:sessionid/appium/receive_async_response | {"required":["response"]} |
175177
| getAlertTextEx | GET | /alert/text<br>get /wd/hub/session/:sessionid/alert/text | |
176-
| setAlertTextEx | POST | /alert/text<br>post /wd/hub/session/:sessionid/alert/text | {"required":["text"]} |
178+
| setAlertTextEx | POST | /alert/text<br>post /wd/hub/session/:sessionid/alert/text | {"optional":["value","text"]} |
177179
| postAcceptAlertEx | POST | /alert/accept<br>post /wd/hub/session/:sessionid/alert/accept | |
178180
| postDismissAlertEx | POST | /alert/dismiss<br>post /wd/hub/session/:sessionid/alert/dismiss | |
179181
| getElementRect | GET | /element/:elementid/rect<br>get /wd/hub/session/:sessionid/element/:elementid/rect | |
180-
| getWindowHandles | GET | /window/handles<br>get /wd/hub/session/:sessionid/window/handles | |
181182
| execute | POST | /execute/sync<br>post /wd/hub/session/:sessionid/execute/sync | {"required":["script","args"]} |
182183
| executeAsync | POST | /execute/async<br>post /wd/hub/session/:sessionid/execute/async | {"required":["script","args"]} |
183184
| getElementScreenshot | GET | /screenshot/:elementid<br>get /wd/hub/session/:sessionid/screenshot/:elementid | |

cmd/Parser/Json/AppiumCommandFull.json

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1988,6 +1988,34 @@
19881988
"https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js"
19891989
]
19901990
},
1991+
"get /wd/hub/session/:sessionid/window/handle": {
1992+
"url": "/window/handle",
1993+
"wdUrl": "/wd/hub/session/:sessionid/window/handle",
1994+
"name": "getWindowHandle",
1995+
"desc": "get /wd/hub/session/:sessionid/window/handle",
1996+
"http_method": "GET",
1997+
"uriParams": [],
1998+
"payloadParams": [],
1999+
"src": "route.json",
2000+
"note": "",
2001+
"link": [
2002+
"https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js"
2003+
]
2004+
},
2005+
"get /wd/hub/session/:sessionid/window/handles": {
2006+
"url": "/window/handles",
2007+
"wdUrl": "/wd/hub/session/:sessionid/window/handles",
2008+
"name": "getWindowHandles",
2009+
"desc": "get /wd/hub/session/:sessionid/window/handles",
2010+
"http_method": "GET",
2011+
"uriParams": [],
2012+
"payloadParams": [],
2013+
"src": "route.json",
2014+
"note": "",
2015+
"link": [
2016+
"https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js"
2017+
]
2018+
},
19912019
"post /wd/hub/session/:sessionid/frame/parent": {
19922020
"url": "/frame/parent",
19932021
"wdUrl": "/wd/hub/session/:sessionid/frame/parent",
@@ -2867,7 +2895,8 @@
28672895
"http_method": "POST",
28682896
"uriParams": [],
28692897
"payloadParams": {
2870-
"required": [
2898+
"optional": [
2899+
"value",
28712900
"text"
28722901
]
28732902
},
@@ -2921,20 +2950,6 @@
29212950
"https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js"
29222951
]
29232952
},
2924-
"get /wd/hub/session/:sessionid/window/handles": {
2925-
"url": "/window/handles",
2926-
"wdUrl": "/wd/hub/session/:sessionid/window/handles",
2927-
"name": "getWindowHandles",
2928-
"desc": "get /wd/hub/session/:sessionid/window/handles",
2929-
"http_method": "GET",
2930-
"uriParams": [],
2931-
"payloadParams": [],
2932-
"src": "route.json",
2933-
"note": "",
2934-
"link": [
2935-
"https://github.com/appium/appium-base-driver/blob/master/lib/protocol/routes.js"
2936-
]
2937-
},
29382953
"post /wd/hub/session/:sessionid/execute/sync": {
29392954
"url": "/execute/sync",
29402955
"wdUrl": "/wd/hub/session/:sessionid/execute/sync",

cmd/Parser/Json/AppiumCommandRoute.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,21 @@
7171
"command": "getWindowHandle"
7272
}
7373
},
74+
"/wd/hub/session/:sessionId/window/handle": {
75+
"GET": {
76+
"command": "getWindowHandle"
77+
}
78+
},
7479
"/wd/hub/session/:sessionId/window_handles": {
7580
"GET": {
7681
"command": "getWindowHandles"
7782
}
7883
},
84+
"/wd/hub/session/:sessionId/window/handles": {
85+
"GET": {
86+
"command": "getWindowHandles"
87+
}
88+
},
7989
"/wd/hub/session/:sessionId/url": {
8090
"GET": {
8191
"command": "getUrl"
@@ -1235,7 +1245,8 @@
12351245
"POST": {
12361246
"command": "setAlertText",
12371247
"payloadParams": {
1238-
"required": [
1248+
"optional": [
1249+
"value",
12391250
"text"
12401251
]
12411252
}
@@ -1256,11 +1267,6 @@
12561267
"command": "getElementRect"
12571268
}
12581269
},
1259-
"/wd/hub/session/:sessionId/window/handles": {
1260-
"GET": {
1261-
"command": "getWindowHandles"
1262-
}
1263-
},
12641270
"/wd/hub/session/:sessionId/execute/sync": {
12651271
"POST": {
12661272
"command": "execute",

0 commit comments

Comments
 (0)