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.
Files changed (53) hide show
  1. {syncloud-lib-315/syncloud_lib.egg-info → syncloud-lib-319}/PKG-INFO +1 -1
  2. {syncloud-lib-315 → syncloud-lib-319/syncloud_lib.egg-info}/PKG-INFO +1 -1
  3. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/integration/conftest.py +14 -10
  4. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/integration/selenium_wrapper.py +12 -3
  5. syncloud-lib-319/version +1 -0
  6. syncloud-lib-315/version +0 -1
  7. {syncloud-lib-315 → syncloud-lib-319}/LICENSE +0 -0
  8. {syncloud-lib-315 → syncloud-lib-319}/MANIFEST.in +0 -0
  9. {syncloud-lib-315 → syncloud-lib-319}/setup.cfg +0 -0
  10. {syncloud-lib-315 → syncloud-lib-319}/setup.py +0 -0
  11. {syncloud-lib-315 → syncloud-lib-319}/syncloud_lib.egg-info/SOURCES.txt +0 -0
  12. {syncloud-lib-315 → syncloud-lib-319}/syncloud_lib.egg-info/dependency_links.txt +0 -0
  13. {syncloud-lib-315 → syncloud-lib-319}/syncloud_lib.egg-info/requires.txt +0 -0
  14. {syncloud-lib-315 → syncloud-lib-319}/syncloud_lib.egg-info/top_level.txt +0 -0
  15. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/__init__.py +0 -0
  16. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/application/__init__.py +0 -0
  17. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/application/config.py +0 -0
  18. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/application/connection.py +0 -0
  19. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/application/paths.py +0 -0
  20. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/application/ports.py +0 -0
  21. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/application/service.py +0 -0
  22. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/application/storage.py +0 -0
  23. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/application/urls.py +0 -0
  24. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/application/users.py +0 -0
  25. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/error.py +0 -0
  26. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/fs.py +0 -0
  27. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/gen.py +0 -0
  28. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/http.py +0 -0
  29. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/integration/__init__.py +0 -0
  30. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/integration/device.py +0 -0
  31. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/integration/hosts.py +0 -0
  32. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/integration/installer.py +0 -0
  33. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/integration/loop.py +0 -0
  34. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/integration/screenshots.py +0 -0
  35. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/integration/ssh.py +0 -0
  36. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/json/__init__.py +0 -0
  37. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/json/convertible.py +0 -0
  38. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/linux.py +0 -0
  39. {syncloud-lib-315 → syncloud-lib-319}/syncloudlib/logger.py +0 -0
  40. {syncloud-lib-315 → syncloud-lib-319}/test/application/test_connection.py +0 -0
  41. {syncloud-lib-315 → syncloud-lib-319}/test/application/test_paths.py +0 -0
  42. {syncloud-lib-315 → syncloud-lib-319}/test/application/test_service.py +0 -0
  43. {syncloud-lib-315 → syncloud-lib-319}/test/application/test_storage.py +0 -0
  44. {syncloud-lib-315 → syncloud-lib-319}/test/application/test_urls.py +0 -0
  45. {syncloud-lib-315 → syncloud-lib-319}/test/integration/test_hosts.py +0 -0
  46. {syncloud-lib-315 → syncloud-lib-319}/test/integration/test_installer.py +0 -0
  47. {syncloud-lib-315 → syncloud-lib-319}/test/integration/test_loop.py +0 -0
  48. {syncloud-lib-315 → syncloud-lib-319}/test/integration/test_ssh.py +0 -0
  49. {syncloud-lib-315 → syncloud-lib-319}/test/json/test_convertible.py +0 -0
  50. {syncloud-lib-315 → syncloud-lib-319}/test/test_fs.py +0 -0
  51. {syncloud-lib-315 → syncloud-lib-319}/test/test_gen.py +0 -0
  52. {syncloud-lib-315 → syncloud-lib-319}/test/test_linux.py +0 -0
  53. {syncloud-lib-315 → syncloud-lib-319}/test/test_logger.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: syncloud-lib
3
- Version: 315
3
+ Version: 319
4
4
  Summary: Syncloud common library
5
5
  Home-page: https://github.com/syncloud/lib
6
6
  Author: Syncloud
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: syncloud-lib
3
- Version: 315
3
+ Version: 319
4
4
  Summary: Syncloud common library
5
5
  Home-page: https://github.com/syncloud/lib
6
6
  Author: Syncloud
@@ -127,12 +127,15 @@ def service_prefix():
127
127
  return get_service_prefix()
128
128
 
129
129
 
130
- def new_firefox_driver(user_agent, hub_url):
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
- options.set_preference("general.useragent.override", user_agent)
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(user_agent, hub_url):
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
- options.add_argument('user-agent={}'.format(user_agent))
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(user_agent, hub_url)
176
+ driver = new_firefox_driver(hub_url, ui_mode)
173
177
  else:
174
- driver = new_chrome_driver(user_agent, hub_url)
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
- self.driver.find_element(by, value).click()
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
- return self.driver.find_element(by, value)
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
- return self.driver.find_element(by, value)
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)
@@ -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