appium-safari-driver 3.2.1 → 3.2.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.
- package/.github/workflows/publish.js.yml +11 -4
- package/README.md +21 -24
- package/npm-shrinkwrap.json +5379 -36812
- package/package.json +1 -1
|
@@ -10,18 +10,25 @@ jobs:
|
|
|
10
10
|
runs-on: macos-latest
|
|
11
11
|
steps:
|
|
12
12
|
- uses: actions/checkout@v2
|
|
13
|
-
- name: Use Node.js
|
|
13
|
+
- name: Use Node.js 16.x
|
|
14
14
|
uses: actions/setup-node@v1
|
|
15
15
|
with:
|
|
16
|
-
node-version:
|
|
16
|
+
node-version: 16.x
|
|
17
17
|
- name: install newer npm
|
|
18
18
|
run: npm install -g npm
|
|
19
19
|
- run: npm install
|
|
20
20
|
name: Install dependencies
|
|
21
|
-
- run: rm -rf package-lock.json
|
|
22
|
-
- run: npm shrinkwrap
|
|
23
21
|
- run: npm test
|
|
24
22
|
name: Run NPM Test
|
|
23
|
+
- run: |
|
|
24
|
+
rm -rf package-lock.json
|
|
25
|
+
npm prune --production
|
|
26
|
+
rm -rf node_modules/appium
|
|
27
|
+
name: Remove dev dependencies and appium peer dependencies
|
|
28
|
+
- run: npm shrinkwrap
|
|
29
|
+
name: Create shrinkwrap
|
|
30
|
+
- run: npm install --only=dev
|
|
31
|
+
name: Install dev dependencies for the release
|
|
25
32
|
- run: npx semantic-release
|
|
26
33
|
env:
|
|
27
34
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
package/README.md
CHANGED
|
@@ -49,43 +49,40 @@ import pytest
|
|
|
49
49
|
import time
|
|
50
50
|
|
|
51
51
|
from appium import webdriver
|
|
52
|
+
# Options are available in Python client since v2.6.0
|
|
53
|
+
from appium.options.ios import SafariOptions
|
|
52
54
|
from selenium.webdriver.common.by import By
|
|
53
55
|
|
|
54
56
|
|
|
55
|
-
def
|
|
57
|
+
def generate_options():
|
|
56
58
|
common_caps = {
|
|
57
59
|
# It does not really matter what to put there, although setting 'Safari' might cause a failure
|
|
58
60
|
# depending on the particular client library
|
|
59
61
|
'browserName': 'AppiumSafari',
|
|
60
|
-
# automationName capability presence is mandatory for this Safari Driver to be selected
|
|
61
|
-
'automationName': 'Safari',
|
|
62
62
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
'safari:deviceName': 'iPad Air 2',
|
|
77
|
-
'safari:useSimulator': True,
|
|
78
|
-
}
|
|
79
|
-
desktop_browser_caps = {
|
|
63
|
+
real_device_opts = SafariOptions().load_capabilities(common_caps)
|
|
64
|
+
# This is optional
|
|
65
|
+
real_device_opts.device_type = 'iPhone'
|
|
66
|
+
# Do not forget to verify that Remote Automation is enabled for this device
|
|
67
|
+
real_device_opts.device_udid = '<MyDeviceUDID>'
|
|
68
|
+
real_device_opts.use_simulator = False
|
|
69
|
+
|
|
70
|
+
simulator_opts = SafariOptions().load_capabilities(common_caps)
|
|
71
|
+
simulator_opts.platform_version = '14.1'
|
|
72
|
+
simulator_opts.device_name = 'iPad Air 2'
|
|
73
|
+
simulator_opts.use_simulator = True
|
|
74
|
+
|
|
75
|
+
desktop_browser_opts = SafariOptions().load_capabilities({
|
|
80
76
|
**common_caps,
|
|
81
77
|
'platformName': 'Mac',
|
|
82
|
-
}
|
|
83
|
-
return [
|
|
78
|
+
})
|
|
79
|
+
return [real_device_opts, simulator_opts, desktop_browser_opts]
|
|
84
80
|
|
|
85
81
|
|
|
86
|
-
@pytest.fixture(params=
|
|
82
|
+
@pytest.fixture(params=generate_options())
|
|
87
83
|
def driver(request):
|
|
88
|
-
|
|
84
|
+
# The default URL is http://127.0.0.1:4723/wd/hub in Appium1
|
|
85
|
+
drv = webdriver.Remote('http://127.0.0.1:4723', options=request.param)
|
|
89
86
|
yield drv
|
|
90
87
|
drv.quit()
|
|
91
88
|
|