@wdio/protocols 5.15.4 → 5.16.7

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 CHANGED
@@ -1,2 +1,37 @@
1
- WebdriverIO PROTOCOLS Service
2
- ========================
1
+ WebdriverIO Protocol Helper
2
+ ===========================
3
+
4
+ This package stores the definition for various automation protocols such as [WebDriver](https://w3c.github.io/webdriver/) or vendor specific protocol extensions like for [SauceLabs](https://saucelabs.com/). Unless you are interested in generating a WebDriver client there should be no reason why you should need this package. This package holds the definition of the following protocols:
5
+
6
+ - [WebDriver](https://w3c.github.io/webdriver/)
7
+ - [JSON Wire Protocol](https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol)
8
+ - [Appium](http://appium.io/)
9
+ - [Mobile JSON Wire Protocol](https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md)
10
+ - [SauceLabs](https://saucelabs.com/)
11
+ - Chrome (WebDriver extension when running Chromedriver)
12
+ - Selenium (when running Selenium Standalone Server)
13
+
14
+ ## Install
15
+
16
+ To install the package, run:
17
+
18
+ ```sh
19
+ $ npm install @wdio/protocols
20
+ ```
21
+
22
+ ## Usage
23
+
24
+ You can get data by importing the package as follows:
25
+
26
+ ```js
27
+ import { WebDriverProtocol, MJsonWProtocol, JsonWProtocol, AppiumProtocol, ChromiumProtocol, SauceLabsProtocol, SeleniumProtocol } from '@wdio/protocols'
28
+
29
+ /**
30
+ * get description of session command
31
+ */
32
+ console.log(WebDriverProtocol['/session'].POST.description)
33
+ ```
34
+
35
+ ----
36
+
37
+ For more information on WebdriverIO see the [homepage](https://webdriver.io).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/protocols",
3
- "version": "5.15.4",
3
+ "version": "5.16.7",
4
4
  "description": "Utility package providing information about automation protocols",
5
5
  "author": "Christian Bromann <christian@saucelabs.com>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/master/packages/wdio-protocols",
@@ -27,5 +27,5 @@
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
- "gitHead": "858fec0e989ccd0de4336e639f3afcabf4b78ce2"
30
+ "gitHead": "f85d0659670a517e119fb1987f533a07422f8c15"
31
31
  }
@@ -2,7 +2,7 @@
2
2
  "/status": {
3
3
  "GET": {
4
4
  "command": "status",
5
- "description": "Query the server's current status. The server should respond with a general \"HTTP 200 OK\" response if it is alive and accepting commands. The response body should be a JSON object describing the state of the server. All server implementations should return two basic objects describing the server's current platform and when the server was built. All fields are optional; if omitted, the client should assume the value is uknown. Furthermore, server implementations may include additional fields not listed here.",
5
+ "description": "Query the server's current status. The server should respond with a general \"HTTP 200 OK\" response if it is alive and accepting commands. The response body should be a JSON object describing the state of the server. All server implementations should return two basic objects describing the server's current platform and when the server was built. All fields are optional; if omitted, the client should assume the value is unknown. Furthermore, server implementations may include additional fields not listed here.",
6
6
  "ref": "https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#status",
7
7
  "parameters": [],
8
8
  "returns": {
@@ -5,32 +5,6 @@
5
5
  "description": "Get webpage specific log information based on the last page load.",
6
6
  "ref": "https://wiki.saucelabs.com/display/DOCS/Custom+Sauce+Labs+WebDriver+Extensions+for+Network+and+Log+Commands#CustomSauceLabsWebDriverExtensionsforNetworkandLogCommands-ExtendedDebuggingTools",
7
7
  "examples": [
8
- [
9
- "// Get Application Metrics Logs",
10
- "console.log(browser.getPageLogs('sauce:metrics'));",
11
- "/**",
12
- " * outputs:",
13
- " * {",
14
- " * \"firstMeaningfulPaint\": 35036.03356,",
15
- " * \"domContentLoaded\": 35036.122972,",
16
- " * \"navigationStart\": 35035.833805,",
17
- " * ...",
18
- " * }",
19
- " */"
20
- ],
21
- [
22
- "// Get Network Timing Logs",
23
- "console.log(browser.getPageLogs('sauce:timing'));",
24
- "/**",
25
- " * outputs:",
26
- " * {",
27
- " * \"loadEventStart\": 622,",
28
- " * \"loadEventEnd\": 622,",
29
- " * \"domInteractive\": 359,",
30
- " * ...",
31
- " * }",
32
- " */"
33
- ],
34
8
  [
35
9
  "// Get Network Logs",
36
10
  "console.log(browser.getPageLogs('sauce:network'));",
@@ -55,7 +29,7 @@
55
29
  " */"
56
30
  ],
57
31
  [
58
- "// Get Performance Logs (coming soon)",
32
+ "// Get Performance Logs (needs capturePerformance capability see: https://wiki.saucelabs.com/display/DOCS/Measure+Page+Load+Performance+Using+Test+Automation#MeasurePageLoadPerformanceUsingTestAutomation-EnableYourScript)",
59
33
  "console.log(browser.getPageLogs('sauce:performance'));",
60
34
  "/**",
61
35
  " * outputs:",
@@ -71,7 +45,7 @@
71
45
  "parameters": [{
72
46
  "name": "type",
73
47
  "type": "string",
74
- "description": "log type (e.g. 'sauce:timing', 'sauce:metrics', 'sauce:network', 'sauce:performance')",
48
+ "description": "log type (e.g. sauce:network', 'sauce:performance')",
75
49
  "required": true
76
50
  }],
77
51
  "returns": {
@@ -180,7 +154,7 @@
180
154
  "/session/:sessionId/sauce/ondemand/performance": {
181
155
  "POST": {
182
156
  "command": "assertPerformance",
183
- "description": "Assert against the performance baseline of your app (private beta service, not yet available to the public).",
157
+ "description": "Assert against the performance baseline of your app.",
184
158
  "ref": "https://wiki.saucelabs.com/display/DOCS/Custom+Sauce+Labs+WebDriver+Extensions+for+Network+and+Log+Commands",
185
159
  "examples": [
186
160
  [
@@ -204,9 +178,9 @@
204
178
  "required": false
205
179
  }],
206
180
  "returns": {
207
- "type": "Boolean",
181
+ "type": "Object",
208
182
  "name": "hasRegression",
209
- "description": "Returns true if any metrics have a regression."
183
+ "description": "An object containing the result as well as metrics about the result."
210
184
  }
211
185
  }
212
186
  },