syncloud-lib 315__tar.gz → 319__tar.gz
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.
- {syncloud-lib-315/syncloud_lib.egg-info → syncloud-lib-319}/PKG-INFO +1 -1
- {syncloud-lib-315 → syncloud-lib-319/syncloud_lib.egg-info}/PKG-INFO +1 -1
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/integration/conftest.py +14 -10
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/integration/selenium_wrapper.py +12 -3
- syncloud-lib-319/version +1 -0
- syncloud-lib-315/version +0 -1
- {syncloud-lib-315 → syncloud-lib-319}/LICENSE +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/MANIFEST.in +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/setup.cfg +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/setup.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloud_lib.egg-info/SOURCES.txt +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloud_lib.egg-info/dependency_links.txt +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloud_lib.egg-info/requires.txt +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloud_lib.egg-info/top_level.txt +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/__init__.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/application/__init__.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/application/config.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/application/connection.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/application/paths.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/application/ports.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/application/service.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/application/storage.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/application/urls.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/application/users.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/error.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/fs.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/gen.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/http.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/integration/__init__.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/integration/device.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/integration/hosts.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/integration/installer.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/integration/loop.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/integration/screenshots.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/integration/ssh.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/json/__init__.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/json/convertible.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/linux.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/logger.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/test/application/test_connection.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/test/application/test_paths.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/test/application/test_service.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/test/application/test_storage.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/test/application/test_urls.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/test/integration/test_hosts.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/test/integration/test_installer.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/test/integration/test_loop.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/test/integration/test_ssh.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/test/json/test_convertible.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/test/test_fs.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/test/test_gen.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/test/test_linux.py +0 -0
- {syncloud-lib-315 → syncloud-lib-319}/test/test_logger.py +0 -0
|
@@ -127,12 +127,15 @@ def service_prefix():
|
|
|
127
127
|
return get_service_prefix()
|
|
128
128
|
|
|
129
129
|
|
|
130
|
-
def new_firefox_driver(
|
|
131
|
-
|
|
130
|
+
def new_firefox_driver(hub_url, ui_mode):
|
|
131
|
+
#desktop_agent = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/100.0"
|
|
132
|
+
mobile_agent = "Mozilla/5.0 (iPhone; CPU iPhone OS 16_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Mobile/15E148 Safari/604.1"
|
|
133
|
+
|
|
132
134
|
options = webdriver.FirefoxOptions()
|
|
133
135
|
options.set_preference('app.update.auto', False)
|
|
134
136
|
options.set_preference('app.update.enabled', False)
|
|
135
|
-
|
|
137
|
+
if ui_mode == "mobile":
|
|
138
|
+
options.set_preference("general.useragent.override", mobile_agent)
|
|
136
139
|
options.set_preference("devtools.console.stdout.content", True)
|
|
137
140
|
options.set_capability('acceptInsecureCerts', True)
|
|
138
141
|
options.set_capability('se:recordVideo', True)
|
|
@@ -143,10 +146,13 @@ def new_firefox_driver(user_agent, hub_url):
|
|
|
143
146
|
)
|
|
144
147
|
|
|
145
148
|
|
|
146
|
-
def new_chrome_driver(
|
|
147
|
-
|
|
149
|
+
def new_chrome_driver(hub_url, ui_mode):
|
|
150
|
+
#desktop_agent = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/100.0"
|
|
151
|
+
mobile_agent = "Mozilla/5.0 (iPhone; CPU iPhone OS 16_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Mobile/15E148 Safari/604.1"
|
|
152
|
+
|
|
148
153
|
options = webdriver.ChromeOptions()
|
|
149
|
-
|
|
154
|
+
if ui_mode == "mobile":
|
|
155
|
+
options.add_argument('user-agent={}'.format(mobile_agent))
|
|
150
156
|
#options.add_argument('--headless')
|
|
151
157
|
options.add_argument('--no-sandbox')
|
|
152
158
|
options.add_argument('--disable-dev-shm-usage')
|
|
@@ -162,16 +168,14 @@ def new_chrome_driver(user_agent, hub_url):
|
|
|
162
168
|
@pytest.fixture(scope="session")
|
|
163
169
|
def driver(ui_mode, browser, browser_height, request):
|
|
164
170
|
hub_url = 'http://selenium:4444/wd/hub'
|
|
165
|
-
user_agent = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/100.0"
|
|
166
171
|
width = 1024
|
|
167
172
|
if ui_mode == "mobile":
|
|
168
|
-
user_agent = "Mozilla/5.0 (iPhone; CPU iPhone OS 16_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Mobile/15E148 Safari/604.1"
|
|
169
173
|
width = 400
|
|
170
174
|
|
|
171
175
|
if browser == "firefox":
|
|
172
|
-
driver = new_firefox_driver(
|
|
176
|
+
driver = new_firefox_driver(hub_url, ui_mode)
|
|
173
177
|
else:
|
|
174
|
-
driver = new_chrome_driver(
|
|
178
|
+
driver = new_chrome_driver(hub_url, ui_mode)
|
|
175
179
|
driver.set_window_rect(0, 0, width, browser_height)
|
|
176
180
|
|
|
177
181
|
def driver_quit():
|
|
@@ -41,15 +41,24 @@ class SeleniumWrapper:
|
|
|
41
41
|
def click_by(self, by, value):
|
|
42
42
|
#self.wait_or_screenshot(expected_conditions.element_to_be_clickable((by, value)))
|
|
43
43
|
self.wait_or_screenshot(expected_conditions.presence_of_element_located((by, value)))
|
|
44
|
-
|
|
44
|
+
try:
|
|
45
|
+
self.driver.find_element(by, value).click()
|
|
46
|
+
except Exception as e:
|
|
47
|
+
self.screenshot('exception', True)
|
|
45
48
|
|
|
46
49
|
def clickable_by(self, by, value):
|
|
47
50
|
self.wait_or_screenshot(expected_conditions.element_to_be_clickable((by, value)))
|
|
48
|
-
|
|
51
|
+
try:
|
|
52
|
+
return self.driver.find_element(by, value)
|
|
53
|
+
except Exception as e:
|
|
54
|
+
self.screenshot('exception', True)
|
|
49
55
|
|
|
50
56
|
def present_by(self, by, value):
|
|
51
57
|
self.wait_or_screenshot(expected_conditions.presence_of_element_located((by, value)))
|
|
52
|
-
|
|
58
|
+
try:
|
|
59
|
+
return self.driver.find_element(by, value)
|
|
60
|
+
except Exception as e:
|
|
61
|
+
self.screenshot('exception', True)
|
|
53
62
|
|
|
54
63
|
def exists_by(self, by, value, timeout=10):
|
|
55
64
|
driver = WebDriverWait(self.driver, timeout)
|
syncloud-lib-319/version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
319
|
syncloud-lib-315/version
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
315
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|