-
Notifications
You must be signed in to change notification settings - Fork 14
/
webdriver.yaml
97 lines (93 loc) · 2.97 KB
/
webdriver.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
doc: |
Demonstration of using Plax to drive a WebDriver to test an Android app.
Note that this test could be extended to work with other channels to
verify some server-side behavior.
To run and extend this demo, see:
1. https://github.com/appium/appium/blob/master/docs/en/about-appium/getting-started.md
2. https://www.w3.org/TR/webdriver/
3. https://appiumpro.com/editions/110-controlling-appium-via-raw-http-requests-with-curl
bindings:
'?!port': '4723'
spec:
phases:
phase1:
steps:
- pub:
chan: mother
payload:
make:
name: wd
type: httpclient
- recv:
chan: mother
pattern:
success: true
- pub:
payload:
url: 'http://localhost:{?!port}/wd/hub/session'
method: POST
headers:
'Content-type':
- 'application/json'
body:
capabilities:
alwaysMatch:
platformName: "Android"
platformVersion: "11"
deviceName: "Android Emulator"
app: "/Users/somebody/Downloads/ApiDemos-debug.apk"
appPackage: "io.appium.android.apis"
appActivity: ."view.TextFields"
automationName: "UiAutomator2"
- recv:
pattern:
body:
value:
sessionId: "?SID"
- pub:
payload:
url: 'http://localhost:{?!port}/wd/hub/session/{?SID}/element'
method: POST
headers:
'Content-type':
- 'application/json'
body:
using: class name
value: android.widget.EditText
- recv:
pattern:
body:
value:
ELEMENT: "?ELEMENT"
- pub:
payload:
url: 'http://localhost:{?!port}/wd/hub/session/{?SID}/element/{?ELEMENT}/clear'
method: POST
headers:
'Content-type':
- 'application/json'
- pub:
payload:
url: 'http://localhost:{?!port}/wd/hub/session/{?SID}/element/{?ELEMENT}/value'
method: POST
headers:
'Content-type':
- 'application/json'
body:
text: "Please send queso."
- pub:
payload:
url: 'http://localhost:{?!port}/wd/hub/session/{?SID}/element/{?ELEMENT}/text'
pollinterval: 300ms
method: GET
- recv:
pattern:
body:
value: "Please send queso."
- pub:
payload:
terminate: last
- pub:
payload:
url: 'http://localhost:{?!port}/wd/hub/session/{?SID}'
method: DELETE