-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.js
35 lines (28 loc) · 867 Bytes
/
test.js
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
const {remote} = require('webdriverio')
/** @type {import('webdriverio').RemoteOptions */
const OPTS = {
hostname: 'localhost',
port: 4444,
connectionRetryCount: 0,
}
const CAPS = {
platformName: 'iOS',
'appium:platformVersion': '15.5',
'appium:automationName': 'XCUITest',
'appium:browserName': 'Safari',
'appium:noReset': true,
}
async function test() {
/** @type {import('webdriverio').Browser<'async'>} */
const driver1 = await remote({...OPTS, capabilities: {...CAPS, 'appium:deviceName': 'iPhone 13'}})
/** @type {import('webdriverio').Browser<'async'>} */
const driver2 = await remote({...OPTS, capabilities: {...CAPS, 'appium:deviceName': 'iPhone 12'}})
// can do drivery stuff here
await driver1.deleteSession()
await driver2.deleteSession()
}
if (require.main === module) {
test().catch(err => {
throw err
});
}