@wdio/protocols 6.12.0 → 7.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/build/commands/appium.d.ts +546 -0
- package/build/commands/appium.d.ts.map +1 -0
- package/build/commands/appium.js +2 -0
- package/build/commands/chromium.d.ts +277 -0
- package/build/commands/chromium.d.ts.map +1 -0
- package/build/commands/chromium.js +2 -0
- package/build/commands/jsonwp.d.ts +764 -0
- package/build/commands/jsonwp.d.ts.map +1 -0
- package/build/commands/jsonwp.js +2 -0
- package/build/commands/mjsonwp.d.ts +75 -0
- package/build/commands/mjsonwp.d.ts.map +1 -0
- package/build/commands/mjsonwp.js +2 -0
- package/build/commands/saucelabs.d.ts +195 -0
- package/build/commands/saucelabs.d.ts.map +1 -0
- package/build/commands/saucelabs.js +2 -0
- package/build/commands/selenium.d.ts +44 -0
- package/build/commands/selenium.d.ts.map +1 -0
- package/build/commands/selenium.js +2 -0
- package/build/commands/webdriver.d.ts +596 -0
- package/build/commands/webdriver.d.ts.map +1 -0
- package/build/commands/webdriver.js +2 -0
- package/build/index.d.ts +43 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +28 -0
- package/build/types.d.ts +160 -0
- package/build/types.d.ts.map +1 -0
- package/build/types.js +2 -0
- package/package.json +6 -6
- package/protocols/appium.json +5 -0
- package/protocols/chromium.json +2 -6
- package/protocols/jsonwp.json +5 -5
- package/protocols/saucelabs.json +2 -1
- package/protocols/webdriver.json +5 -5
- package/tsconfig.json +12 -0
- package/tsconfig.prod.json +12 -0
- package/index.d.ts +0 -92
- package/index.js +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonwp.d.ts","sourceRoot":"","sources":["../../src/commands/jsonwp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,uBAAuB,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,UA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,CAAC;IAEvC;;;;;;OAMG;IACH,eAAe,IAAI,MAAM,EAAE,CAAC;IAE5B;;;;;;OAMG;IACH,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAElD;;;;;;OAMG;IACH,iBAAiB,IAAI,IAAI,CAAC;IAE1B;;;;;;OAMG;IACH,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IAEzC;;;;;;OAMG;IACH,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1C;;;;;;OAMG;IACH,mBAAmB,IAAI,MAAM,CAAC;IAE9B;;;;;;OAMG;IACH,iBAAiB,IAAI,MAAM,EAAE,CAAC;IAE9B;;;;;;OAMG;IACH,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpD;;;;;;OAMG;IACH,mBAAmB,IAAI,IAAI,CAAC;IAE5B;;;;;;OAMG;IACH,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IAE3C;;;;;;OAMG;IACH,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5C;;;;;;OAMG;IACH,qBAAqB,IAAI,MAAM,CAAC;IAEhC;;;;;;OAMG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAEhC;;;;;;OAMG;IACH,WAAW,IAAI,MAAM,EAAE,CAAC;IAExB;;;;;;OAMG;IACH,yBAAyB,IAAI,MAAM,CAAC;CACvC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export default interface MjsonwpCommands {
|
|
2
|
+
/**
|
|
3
|
+
* Mjsonwp Protocol Command
|
|
4
|
+
*
|
|
5
|
+
* No description available, please see reference link.
|
|
6
|
+
* @ref https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
getContext(): string | null;
|
|
10
|
+
/**
|
|
11
|
+
* Mjsonwp Protocol Command
|
|
12
|
+
*
|
|
13
|
+
* No description available, please see reference link.
|
|
14
|
+
* @ref https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
switchContext(name: string): void;
|
|
18
|
+
/**
|
|
19
|
+
* Mjsonwp Protocol Command
|
|
20
|
+
*
|
|
21
|
+
* No description available, please see reference link.
|
|
22
|
+
* @ref https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
getContexts(): string[];
|
|
26
|
+
/**
|
|
27
|
+
* Mjsonwp Protocol Command
|
|
28
|
+
*
|
|
29
|
+
* No description available, please see reference link.
|
|
30
|
+
* @ref https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md#mobile-json-wire-protocol-endpoints
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
getPageIndex(): string;
|
|
34
|
+
/**
|
|
35
|
+
* Mjsonwp Protocol Command
|
|
36
|
+
*
|
|
37
|
+
* No description available, please see reference link.
|
|
38
|
+
* @ref https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-modes
|
|
39
|
+
*
|
|
40
|
+
*/
|
|
41
|
+
getNetworkConnection(): number;
|
|
42
|
+
/**
|
|
43
|
+
* Mjsonwp Protocol Command
|
|
44
|
+
*
|
|
45
|
+
* No description available, please see reference link.
|
|
46
|
+
* @ref https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-modes
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
49
|
+
setNetworkConnection(type: number): void;
|
|
50
|
+
/**
|
|
51
|
+
* Mjsonwp Protocol Command
|
|
52
|
+
*
|
|
53
|
+
* No description available, please see reference link.
|
|
54
|
+
* @ref https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#touch-gestures
|
|
55
|
+
*
|
|
56
|
+
*/
|
|
57
|
+
touchPerform(actions: object[]): void;
|
|
58
|
+
/**
|
|
59
|
+
* Mjsonwp Protocol Command
|
|
60
|
+
*
|
|
61
|
+
* No description available, please see reference link.
|
|
62
|
+
* @ref https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#touch-gestures
|
|
63
|
+
*
|
|
64
|
+
*/
|
|
65
|
+
multiTouchPerform(actions: object[], elementId: object[]): void;
|
|
66
|
+
/**
|
|
67
|
+
* Mjsonwp Protocol Command
|
|
68
|
+
*
|
|
69
|
+
* No description available, please see reference link.
|
|
70
|
+
* @ref https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md#mobile-json-wire-protocol-endpoints
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
receiveAsyncResponse(status: string, value: string): void;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=mjsonwp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mjsonwp.d.ts","sourceRoot":"","sources":["../../src/commands/mjsonwp.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,WAAW,eAAe;IAEpC;;;;;;OAMG;IACH,UAAU,IAAI,MAAM,GAAC,IAAI,CAAC;IAE1B;;;;;;OAMG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAElC;;;;;;OAMG;IACH,WAAW,IAAI,MAAM,EAAE,CAAC;IAExB;;;;;;OAMG;IACH,YAAY,IAAI,MAAM,CAAC;IAEvB;;;;;;OAMG;IACH,oBAAoB,IAAI,MAAM,CAAC;IAE/B;;;;;;OAMG;IACH,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzC;;;;;;OAMG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAEtC;;;;;;OAMG;IACH,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAEhE;;;;;;OAMG;IACH,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7D"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { ProtocolCommandResponse } from '../types';
|
|
2
|
+
export default interface SaucelabsCommands {
|
|
3
|
+
/**
|
|
4
|
+
* Saucelabs Protocol Command
|
|
5
|
+
*
|
|
6
|
+
* Get webpage specific log information based on the last page load.
|
|
7
|
+
* @ref https://wiki.saucelabs.com/display/DOCS/Custom+Sauce+Labs+WebDriver+Extensions+for+Network+and+Log+Commands#CustomSauceLabsWebDriverExtensionsforNetworkandLogCommands-ExtendedDebuggingTools
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```js
|
|
11
|
+
* // Get Network Logs
|
|
12
|
+
* console.log(browser.getPageLogs('sauce:network'));
|
|
13
|
+
* //
|
|
14
|
+
* // outputs:
|
|
15
|
+
* // [{
|
|
16
|
+
* // "url": "https://app.saucelabs.com/dashboard",
|
|
17
|
+
* // "statusCode": 200,
|
|
18
|
+
* // "method": "GET",
|
|
19
|
+
* // "requestHeaders": {
|
|
20
|
+
* // ...
|
|
21
|
+
* // },
|
|
22
|
+
* // "responseHeaders": {
|
|
23
|
+
* // ...
|
|
24
|
+
* // },
|
|
25
|
+
* // "timing": {
|
|
26
|
+
* // ...
|
|
27
|
+
* // }
|
|
28
|
+
* // }, {,
|
|
29
|
+
* // ...
|
|
30
|
+
* // }]
|
|
31
|
+
* //
|
|
32
|
+
* ```*
|
|
33
|
+
* @example
|
|
34
|
+
* ```js
|
|
35
|
+
* // Get Performance Logs (needs capturePerformance capability see: https://wiki.saucelabs.com/display/DOCS/Measure+Page+Load+Performance+Using+Test+Automation#MeasurePageLoadPerformanceUsingTestAutomation-EnableYourScript)
|
|
36
|
+
* console.log(browser.getPageLogs('sauce:performance'));
|
|
37
|
+
* //
|
|
38
|
+
* // outputs:
|
|
39
|
+
* // {
|
|
40
|
+
* // "speedIndex": 1472.023,
|
|
41
|
+
* // "timeToFirstInteractive": 1243.214,
|
|
42
|
+
* // "firstMeaningfulPaint": 892.643,
|
|
43
|
+
* // ...
|
|
44
|
+
* // }
|
|
45
|
+
* //
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
getPageLogs(type: string): ProtocolCommandResponse;
|
|
49
|
+
/**
|
|
50
|
+
* Saucelabs Protocol Command
|
|
51
|
+
*
|
|
52
|
+
* With network conditioning you can test your site on a variety of network connections, including Edge, 3G, and even offline. You can throttle the data throughput, including the maximum download and upload throughput, and use latency manipulation to enforce a minimum delay in connection round-trip time (RTT).
|
|
53
|
+
* @ref https://wiki.saucelabs.com/display/DOCS/Custom+Sauce+Labs+WebDriver+Extensions+for+Network+and+Log+Commands#CustomSauceLabsWebDriverExtensionsforNetworkandLogCommands-ThrottleNetworkCapabilities
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```js
|
|
57
|
+
* // predefined network condition
|
|
58
|
+
* browser.throttleNetwork('offline')
|
|
59
|
+
* ```*
|
|
60
|
+
* @example
|
|
61
|
+
* ```js
|
|
62
|
+
* // custom network condition
|
|
63
|
+
* browser.throttleNetwork({
|
|
64
|
+
* download: 1000,
|
|
65
|
+
* upload: 500,
|
|
66
|
+
* latency: 40'
|
|
67
|
+
* })
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
throttleNetwork(condition: (string | object)): void;
|
|
71
|
+
/**
|
|
72
|
+
* Saucelabs Protocol Command
|
|
73
|
+
*
|
|
74
|
+
* You can throttle the CPU in DevTools to understand how your page performs under that constraint.
|
|
75
|
+
* @ref https://wiki.saucelabs.com/display/DOCS/Custom+Sauce+Labs+WebDriver+Extensions+for+Network+and+Log+Commands#CustomSauceLabsWebDriverExtensionsforNetworkandLogCommands-ThrottleCPUCapabilities
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```js
|
|
79
|
+
* // throttle CPU and make it run 4x slower
|
|
80
|
+
* browser.throttleCPU(4)
|
|
81
|
+
* ```*
|
|
82
|
+
* @example
|
|
83
|
+
* ```js
|
|
84
|
+
* // reset CPU throttling
|
|
85
|
+
* browser.throttleCPU(0)
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
throttleCPU(rate: number): void;
|
|
89
|
+
/**
|
|
90
|
+
* Saucelabs Protocol Command
|
|
91
|
+
*
|
|
92
|
+
* Allows modifying any request made by the browser. You can blacklist, modify, or redirect these as required for your tests.
|
|
93
|
+
* @ref https://wiki.saucelabs.com/display/DOCS/Custom+Sauce+Labs+WebDriver+Extensions+for+Network+and+Log+Commands#CustomSauceLabsWebDriverExtensionsforNetworkandLogCommands-InterceptNetworkRequests
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```js
|
|
97
|
+
* // redirect a request
|
|
98
|
+
* browser.interceptRequest({
|
|
99
|
+
* url: 'https://saucelabs.com',
|
|
100
|
+
* redirect: 'https://google.com'
|
|
101
|
+
* })
|
|
102
|
+
* ```*
|
|
103
|
+
* @example
|
|
104
|
+
* ```js
|
|
105
|
+
* // Blacklist requests to 3rd party vendors
|
|
106
|
+
* browser.interceptRequest({
|
|
107
|
+
* url: 'https://api.segment.io/v1/p',
|
|
108
|
+
* error: 'Failed'
|
|
109
|
+
* })
|
|
110
|
+
* ```*
|
|
111
|
+
* @example
|
|
112
|
+
* ```js
|
|
113
|
+
* // Modify requests to REST API (Mock REST API response)
|
|
114
|
+
* browser.interceptRequest({
|
|
115
|
+
* url: 'http://sampleapp.appspot.com/api/todos',
|
|
116
|
+
* response: {
|
|
117
|
+
* headers: {
|
|
118
|
+
* 'x-custom-headers': 'foobar'
|
|
119
|
+
* },
|
|
120
|
+
* body: [{
|
|
121
|
+
* title: 'My custom todo',
|
|
122
|
+
* order: 1,
|
|
123
|
+
* completed: false,
|
|
124
|
+
* url: 'http://todo-backend-express.herokuapp.com/15727'
|
|
125
|
+
* }]
|
|
126
|
+
* }
|
|
127
|
+
* })
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
interceptRequest(rule: object): void;
|
|
131
|
+
/**
|
|
132
|
+
* Saucelabs Protocol Command
|
|
133
|
+
*
|
|
134
|
+
* Assert against the performance baseline of your app.
|
|
135
|
+
* @ref https://wiki.saucelabs.com/display/DOCS/Custom+Sauce+Labs+WebDriver+Extensions+for+Network+and+Log+Commands
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* ```js
|
|
139
|
+
* // test performance for a page
|
|
140
|
+
* browser.url('https://webdriver.io')
|
|
141
|
+
* const hasRegression = browser.assertPerformance({
|
|
142
|
+
* name: 'my performance test', // make sure that the name is also set in the sauce options in your capabilities
|
|
143
|
+
* metrics: ['score', 'firstPaint']
|
|
144
|
+
* })
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
147
|
+
assertPerformance(name: string, metrics?: string[]): ProtocolCommandResponse;
|
|
148
|
+
/**
|
|
149
|
+
* Saucelabs Protocol Command
|
|
150
|
+
*
|
|
151
|
+
* Perform a scroll test that evaluates the jankiness of the application.
|
|
152
|
+
* @ref https://wiki.saucelabs.com/display/DOCS/Custom+Sauce+Labs+WebDriver+Extensions+for+Network+and+Log+Commands
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* ```js
|
|
156
|
+
* // test performance for a page
|
|
157
|
+
* browser.url('https://webdriver.io')
|
|
158
|
+
* browser.jankinessCheck()
|
|
159
|
+
* ```
|
|
160
|
+
*/
|
|
161
|
+
jankinessCheck(): ProtocolCommandResponse;
|
|
162
|
+
/**
|
|
163
|
+
* Saucelabs Protocol Command
|
|
164
|
+
*
|
|
165
|
+
* Mocks a network resource.
|
|
166
|
+
* @ref https://wiki.saucelabs.com/display/DOCS/Custom+Sauce+Labs+WebDriver+Extensions+for+Network+and+Log+Commands
|
|
167
|
+
*
|
|
168
|
+
*/
|
|
169
|
+
mockRequest(url: string, filterOptions?: object): ProtocolCommandResponse;
|
|
170
|
+
/**
|
|
171
|
+
* Saucelabs Protocol Command
|
|
172
|
+
*
|
|
173
|
+
* Receive request information about requests that match the mocked resource.
|
|
174
|
+
* @ref https://wiki.saucelabs.com/display/DOCS/Custom+Sauce+Labs+WebDriver+Extensions+for+Network+and+Log+Commands
|
|
175
|
+
*
|
|
176
|
+
*/
|
|
177
|
+
getMockCalls(mockId: string): ProtocolCommandResponse;
|
|
178
|
+
/**
|
|
179
|
+
* Saucelabs Protocol Command
|
|
180
|
+
*
|
|
181
|
+
* Clear list of mock calls.
|
|
182
|
+
* @ref https://wiki.saucelabs.com/display/DOCS/Custom+Sauce+Labs+WebDriver+Extensions+for+Network+and+Log+Commands
|
|
183
|
+
*
|
|
184
|
+
*/
|
|
185
|
+
clearMockCalls(mockId: string, restore?: boolean): void;
|
|
186
|
+
/**
|
|
187
|
+
* Saucelabs Protocol Command
|
|
188
|
+
*
|
|
189
|
+
* Respond if mock matches a specific resource.
|
|
190
|
+
* @ref https://wiki.saucelabs.com/display/DOCS/Custom+Sauce+Labs+WebDriver+Extensions+for+Network+and+Log+Commands
|
|
191
|
+
*
|
|
192
|
+
*/
|
|
193
|
+
respondMock(mockId: string, payload: object): void;
|
|
194
|
+
}
|
|
195
|
+
//# sourceMappingURL=saucelabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saucelabs.d.ts","sourceRoot":"","sources":["../../src/commands/saucelabs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAGlD,MAAM,CAAC,OAAO,WAAW,iBAAiB;IAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4CG;IACH,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,uBAAuB,CAAC;IAEnD;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,eAAe,CAAC,SAAS,EAAE,CAAC,MAAM,GAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAElD;;;;;;;;;;;;;;;;OAgBG;IACH,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwCG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC;;;;;;;;;;;;;;;OAeG;IACH,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,uBAAuB,CAAC;IAE7E;;;;;;;;;;;;OAYG;IACH,cAAc,IAAI,uBAAuB,CAAC;IAE1C;;;;;;OAMG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,uBAAuB,CAAC;IAE1E;;;;;;OAMG;IACH,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,uBAAuB,CAAC;IAEtD;;;;;;OAMG;IACH,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAExD;;;;;;OAMG;IACH,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACtD"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ProtocolCommandResponse } from '../types';
|
|
2
|
+
export default interface SeleniumCommands {
|
|
3
|
+
/**
|
|
4
|
+
* Selenium Protocol Command
|
|
5
|
+
*
|
|
6
|
+
* Upload a file to remote machine on which the browser is running.
|
|
7
|
+
* @ref https://www.seleniumhq.org/
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
file(file: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Selenium Protocol Command
|
|
13
|
+
*
|
|
14
|
+
* Receive hub config remotely.
|
|
15
|
+
* @ref https://github.com/nicegraham/selenium-grid2-api#gridapihub
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
getHubConfig(): ProtocolCommandResponse;
|
|
19
|
+
/**
|
|
20
|
+
* Selenium Protocol Command
|
|
21
|
+
*
|
|
22
|
+
* Get the details of the Selenium Grid node running a session.
|
|
23
|
+
* @ref https://github.com/nicegraham/selenium-grid2-api#gridapitestsession
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
gridTestSession(session: string): ProtocolCommandResponse;
|
|
27
|
+
/**
|
|
28
|
+
* Selenium Protocol Command
|
|
29
|
+
*
|
|
30
|
+
* Get proxy details.
|
|
31
|
+
* @ref https://github.com/nicegraham/selenium-grid2-api#gridapiproxy
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
gridProxyDetails(id: string): ProtocolCommandResponse;
|
|
35
|
+
/**
|
|
36
|
+
* Selenium Protocol Command
|
|
37
|
+
*
|
|
38
|
+
* Manage lifecycle of hub node.
|
|
39
|
+
* @ref https://github.com/nicegraham/selenium-grid2-api#lifecycle-manager
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
manageSeleniumHubLifecycle(action: string): void;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=selenium.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selenium.d.ts","sourceRoot":"","sources":["../../src/commands/selenium.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAGlD,MAAM,CAAC,OAAO,WAAW,gBAAgB;IAErC;;;;;;OAMG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAE3B;;;;;;OAMG;IACH,YAAY,IAAI,uBAAuB,CAAC;IAExC;;;;;;OAMG;IACH,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,uBAAuB,CAAC;IAE1D;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,uBAAuB,CAAC;IAEtD;;;;;;OAMG;IACH,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACpD"}
|