webdriverio 8.26.3 → 8.27.2

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.
@@ -19,39 +19,10 @@ interface EmulationOptions {
19
19
  *
20
20
  * :::
21
21
  *
22
- * <example>
23
- :emulateColorScheme.js
24
- it('should open WebdriverIO using light color scheme', async () => {
25
- await browser.emulate('colorScheme', 'light')
26
- await browser.url('https://webdriver.io')
27
- const backgroundColor = await browser.$('nav').getCSSProperty('background-color')
28
- console.log(backgroundColor.parsed.hex) // outputs: "#efefef"
29
- })
30
- it('should open WebdriverIO using dark color scheme'm async () => {
31
- await browser.emulate('colorScheme', 'dark')
32
- await browser.url('https://webdriver.io')
33
- const backgroundColor = await browser.$('nav').getCSSProperty('background-color')
34
- console.log(backgroundColor.parsed.hex) // outputs: "#000000"
35
- })
36
- * </example>
37
- *
38
- * <example>
39
- :emulateGeoLocation.js
40
- it('should find my emulated geo location', async () => {
41
- await browser.emulate('geolocation', {
42
- latitude: 52.52,
43
- longitude: 13.39,
44
- accuracy: 100
45
- })
46
- await browser.url('https://www.google.com/maps')
47
- await browser.$('aria/Show Your Location').click()
48
- await browser.pause(5000)
49
- console.log(await browser.getUrl()) // outputs: "https://www.google.com/maps/@52.52,13.39,16z?entry=ttu"
50
- })
51
- * </example>
52
- *
53
22
  * @param {string} scope feature of the browser you like to emulate, can be either `geolocation`, `userAgent`, `colorScheme` or `onLine`
54
23
  * @param {EmulationOptions} options emulation option for specific scope
24
+ * @example https://github.com/webdriverio/example-recipes/blob/9bff2baf8a0678c6886f8591d9fc8dea201895d3/emulate/example.js#L4-L18
25
+ * @example https://github.com/webdriverio/example-recipes/blob/9bff2baf8a0678c6886f8591d9fc8dea201895d3/emulate/example.js#L20-L36
55
26
  * @returns `void`
56
27
  */
57
28
  export declare function emulate<Scope extends SupportedScopes>(this: WebdriverIO.Browser, scope: Scope, options: EmulationOptions[Scope]): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"emulate.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/emulate.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG,aAAa,GAAG,WAAW,GAAG,aAAa,GAAG,QAAQ,CAAA;AAE7E,UAAU,gBAAgB;IACtB,WAAW,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAA;IAC5C,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,OAAO,GAAG,MAAM,CAAA;IAC7B,MAAM,EAAE,OAAO,CAAA;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,wBAAsB,OAAO,CAAC,KAAK,SAAS,eAAe,EACvD,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,gBAAgB,CAAC,KAAK,CAAC,iBAuFnC"}
1
+ {"version":3,"file":"emulate.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/emulate.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG,aAAa,GAAG,WAAW,GAAG,aAAa,GAAG,QAAQ,CAAA;AAE7E,UAAU,gBAAgB;IACtB,WAAW,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAA;IAC5C,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,OAAO,GAAG,MAAM,CAAA;IAC7B,MAAM,EAAE,OAAO,CAAA;CAClB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,OAAO,CAAC,KAAK,SAAS,eAAe,EACvD,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,gBAAgB,CAAC,KAAK,CAAC,iBAuFnC"}
@@ -12,39 +12,10 @@
12
12
  *
13
13
  * :::
14
14
  *
15
- * <example>
16
- :emulateColorScheme.js
17
- it('should open WebdriverIO using light color scheme', async () => {
18
- await browser.emulate('colorScheme', 'light')
19
- await browser.url('https://webdriver.io')
20
- const backgroundColor = await browser.$('nav').getCSSProperty('background-color')
21
- console.log(backgroundColor.parsed.hex) // outputs: "#efefef"
22
- })
23
- it('should open WebdriverIO using dark color scheme'm async () => {
24
- await browser.emulate('colorScheme', 'dark')
25
- await browser.url('https://webdriver.io')
26
- const backgroundColor = await browser.$('nav').getCSSProperty('background-color')
27
- console.log(backgroundColor.parsed.hex) // outputs: "#000000"
28
- })
29
- * </example>
30
- *
31
- * <example>
32
- :emulateGeoLocation.js
33
- it('should find my emulated geo location', async () => {
34
- await browser.emulate('geolocation', {
35
- latitude: 52.52,
36
- longitude: 13.39,
37
- accuracy: 100
38
- })
39
- await browser.url('https://www.google.com/maps')
40
- await browser.$('aria/Show Your Location').click()
41
- await browser.pause(5000)
42
- console.log(await browser.getUrl()) // outputs: "https://www.google.com/maps/@52.52,13.39,16z?entry=ttu"
43
- })
44
- * </example>
45
- *
46
15
  * @param {string} scope feature of the browser you like to emulate, can be either `geolocation`, `userAgent`, `colorScheme` or `onLine`
47
16
  * @param {EmulationOptions} options emulation option for specific scope
17
+ * @example https://github.com/webdriverio/example-recipes/blob/9bff2baf8a0678c6886f8591d9fc8dea201895d3/emulate/example.js#L4-L18
18
+ * @example https://github.com/webdriverio/example-recipes/blob/9bff2baf8a0678c6886f8591d9fc8dea201895d3/emulate/example.js#L20-L36
48
19
  * @returns `void`
49
20
  */
50
21
  export async function emulate(scope, options) {
@@ -170,7 +170,7 @@ export default function isElementDisplayed(element) {
170
170
  // This is a partial reimplementation of Selenium's "element is displayed" algorithm.
171
171
  // When the W3C specification's algorithm stabilizes, we should implement that.
172
172
  // If this command is misdirected to the wrong document (and is NOT inside a shadow root), treat it as not shown.
173
- if (!isElementInsideShadowRoot(element) && !document.body.contains(element)) {
173
+ if (!isElementInsideShadowRoot(element) && !document.contains(element)) {
174
174
  return false;
175
175
  }
176
176
  // Special cases for specific tag names.
@@ -1 +1 @@
1
- {"version":3,"file":"detectBackend.d.ts","sourceRoot":"","sources":["../../src/utils/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xE"}
@@ -8,6 +8,7 @@ const REGION_MAPPING = {
8
8
  'eu': 'eu-central-1.',
9
9
  'eu-central-1': 'eu-central-1.',
10
10
  'us-east-1': 'us-east-1.',
11
+ 'us-east-4': 'us-east-4.',
11
12
  'apac': 'apac-southeast-1.',
12
13
  'apac-southeast-1': 'apac-southeast-1',
13
14
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "webdriverio",
3
3
  "description": "Next-gen browser and mobile automation test framework for Node.js",
4
- "version": "8.26.3",
4
+ "version": "8.27.2",
5
5
  "homepage": "https://webdriver.io",
6
6
  "author": "Christian Bromann <mail@bromann.dev>",
7
7
  "license": "MIT",
@@ -69,17 +69,17 @@
69
69
  },
70
70
  "dependencies": {
71
71
  "@types/node": "^20.1.0",
72
- "@wdio/config": "8.26.3",
72
+ "@wdio/config": "8.27.2",
73
73
  "@wdio/logger": "8.24.12",
74
74
  "@wdio/protocols": "8.24.12",
75
75
  "@wdio/repl": "8.24.12",
76
- "@wdio/types": "8.26.3",
77
- "@wdio/utils": "8.26.3",
76
+ "@wdio/types": "8.27.2",
77
+ "@wdio/utils": "8.27.2",
78
78
  "archiver": "^6.0.0",
79
79
  "aria-query": "^5.0.0",
80
80
  "css-shorthand-properties": "^1.1.1",
81
81
  "css-value": "^0.0.1",
82
- "devtools-protocol": "^0.0.1237913",
82
+ "devtools-protocol": "^0.0.1239539",
83
83
  "grapheme-splitter": "^1.0.2",
84
84
  "import-meta-resolve": "^4.0.0",
85
85
  "is-plain-obj": "^4.1.0",
@@ -91,7 +91,7 @@
91
91
  "resq": "^1.9.1",
92
92
  "rgb2hex": "0.2.5",
93
93
  "serialize-error": "^11.0.1",
94
- "webdriver": "8.26.3"
94
+ "webdriver": "8.27.2"
95
95
  },
96
96
  "peerDependencies": {
97
97
  "devtools": "^8.14.0"
@@ -101,5 +101,5 @@
101
101
  "optional": true
102
102
  }
103
103
  },
104
- "gitHead": "284ce5591d90d9ea5f591e977d04557fd9ec4011"
104
+ "gitHead": "dab64ff6cbd378b295af3a65d6346692f0653d23"
105
105
  }