webdriverio 8.38.2 → 8.39.0
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.
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
* Be careful though, this command affects your test time tremendously since spawning
|
|
7
7
|
* new Selenium sessions is very time consuming especially when using cloud services.
|
|
8
8
|
*
|
|
9
|
+
* Connection parameters such as hostname, port, protocol, etc. can be added along side
|
|
10
|
+
* browserName when you want to connect to a different remote service. This is useful
|
|
11
|
+
* in a situation, for example, where you start a test in native app and need to verify
|
|
12
|
+
* data in web app.
|
|
13
|
+
*
|
|
14
|
+
* If you start from remote service, you can pass in 0.0.0.0 for hostname if you want
|
|
15
|
+
* to switch to local drivers.
|
|
16
|
+
*
|
|
9
17
|
* <example>
|
|
10
18
|
:reloadSync.js
|
|
11
19
|
it('should reload my session with current capabilities', async () => {
|
|
@@ -21,6 +29,18 @@
|
|
|
21
29
|
})
|
|
22
30
|
console.log(browser.capabilities.browserName) // outputs: firefox
|
|
23
31
|
})
|
|
32
|
+
|
|
33
|
+
it('should reload my session with new remote', async () => {
|
|
34
|
+
console.log(browser.capabilities.browserName) // outputs: chrome
|
|
35
|
+
await browser.reloadSession({
|
|
36
|
+
protocol: 'https',
|
|
37
|
+
host: '0.0.0.1',
|
|
38
|
+
port: 4444,
|
|
39
|
+
path: '/wd/hub',
|
|
40
|
+
browserName: 'firefox'
|
|
41
|
+
})
|
|
42
|
+
console.log(browser.capabilities.browserName) // outputs: firefox
|
|
43
|
+
})
|
|
24
44
|
* </example>
|
|
25
45
|
*
|
|
26
46
|
* @alias browser.reloadSession
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reloadSession.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/reloadSession.ts"],"names":[],"mappings":"AAKA
|
|
1
|
+
{"version":3,"file":"reloadSession.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/reloadSession.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAsB,aAAa,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,EAAE,eAAe,CAAC,EAAE,WAAW,CAAC,YAAY,mBAoCzG"}
|
|
@@ -8,6 +8,14 @@ const log = logger('webdriverio');
|
|
|
8
8
|
* Be careful though, this command affects your test time tremendously since spawning
|
|
9
9
|
* new Selenium sessions is very time consuming especially when using cloud services.
|
|
10
10
|
*
|
|
11
|
+
* Connection parameters such as hostname, port, protocol, etc. can be added along side
|
|
12
|
+
* browserName when you want to connect to a different remote service. This is useful
|
|
13
|
+
* in a situation, for example, where you start a test in native app and need to verify
|
|
14
|
+
* data in web app.
|
|
15
|
+
*
|
|
16
|
+
* If you start from remote service, you can pass in 0.0.0.0 for hostname if you want
|
|
17
|
+
* to switch to local drivers.
|
|
18
|
+
*
|
|
11
19
|
* <example>
|
|
12
20
|
:reloadSync.js
|
|
13
21
|
it('should reload my session with current capabilities', async () => {
|
|
@@ -23,6 +31,18 @@ const log = logger('webdriverio');
|
|
|
23
31
|
})
|
|
24
32
|
console.log(browser.capabilities.browserName) // outputs: firefox
|
|
25
33
|
})
|
|
34
|
+
|
|
35
|
+
it('should reload my session with new remote', async () => {
|
|
36
|
+
console.log(browser.capabilities.browserName) // outputs: chrome
|
|
37
|
+
await browser.reloadSession({
|
|
38
|
+
protocol: 'https',
|
|
39
|
+
host: '0.0.0.1',
|
|
40
|
+
port: 4444,
|
|
41
|
+
path: '/wd/hub',
|
|
42
|
+
browserName: 'firefox'
|
|
43
|
+
})
|
|
44
|
+
console.log(browser.capabilities.browserName) // outputs: firefox
|
|
45
|
+
})
|
|
26
46
|
* </example>
|
|
27
47
|
*
|
|
28
48
|
* @alias browser.reloadSession
|
|
@@ -10,7 +10,7 @@ export {};
|
|
|
10
10
|
mock.respond('https://webdriver.io/img/webdriverio.png')
|
|
11
11
|
await browser.url('https://google.com') // shows WebdriverIO logo instead of Google
|
|
12
12
|
|
|
13
|
-
mock.restore()
|
|
13
|
+
await mock.restore()
|
|
14
14
|
await browser.url('https://google.com') // shows normal Google logo again
|
|
15
15
|
})
|
|
16
16
|
* </example>
|
|
@@ -10,7 +10,7 @@ export {};
|
|
|
10
10
|
mock.respond('https://webdriver.io/img/webdriverio.png')
|
|
11
11
|
await browser.url('https://google.com') // shows WebdriverIO logo instead of Google
|
|
12
12
|
|
|
13
|
-
mock.restore()
|
|
13
|
+
await mock.restore()
|
|
14
14
|
await browser.url('https://google.com') // shows normal Google logo again
|
|
15
15
|
})
|
|
16
16
|
* </example>
|
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.
|
|
4
|
+
"version": "8.39.0",
|
|
5
5
|
"homepage": "https://webdriver.io",
|
|
6
6
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -69,12 +69,12 @@
|
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@types/node": "^20.1.0",
|
|
72
|
-
"@wdio/config": "8.
|
|
72
|
+
"@wdio/config": "8.39.0",
|
|
73
73
|
"@wdio/logger": "8.38.0",
|
|
74
74
|
"@wdio/protocols": "8.38.0",
|
|
75
75
|
"@wdio/repl": "8.24.12",
|
|
76
|
-
"@wdio/types": "8.
|
|
77
|
-
"@wdio/utils": "8.
|
|
76
|
+
"@wdio/types": "8.39.0",
|
|
77
|
+
"@wdio/utils": "8.39.0",
|
|
78
78
|
"archiver": "^7.0.0",
|
|
79
79
|
"aria-query": "^5.0.0",
|
|
80
80
|
"css-shorthand-properties": "^1.1.1",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"resq": "^1.9.1",
|
|
93
93
|
"rgb2hex": "0.2.5",
|
|
94
94
|
"serialize-error": "^11.0.1",
|
|
95
|
-
"webdriver": "8.
|
|
95
|
+
"webdriver": "8.39.0"
|
|
96
96
|
},
|
|
97
97
|
"peerDependencies": {
|
|
98
98
|
"devtools": "^8.14.0"
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"optional": true
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "82da6a28fabaf5f5fad29ea6dc976091027955f8"
|
|
106
106
|
}
|