Promium 3.6.3__tar.gz → 3.6.4__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 (58) hide show
  1. {promium-3.6.3 → promium-3.6.4}/PKG-INFO +1 -1
  2. {promium-3.6.3 → promium-3.6.4}/Promium.egg-info/PKG-INFO +1 -1
  3. {promium-3.6.3 → promium-3.6.4}/promium/browsers.py +14 -19
  4. {promium-3.6.3 → promium-3.6.4}/promium/plugin.py +6 -1
  5. {promium-3.6.3 → promium-3.6.4}/promium/test_case.py +4 -1
  6. {promium-3.6.3 → promium-3.6.4}/setup.py +1 -1
  7. {promium-3.6.3 → promium-3.6.4}/LICENSE +0 -0
  8. {promium-3.6.3 → promium-3.6.4}/Promium.egg-info/SOURCES.txt +0 -0
  9. {promium-3.6.3 → promium-3.6.4}/Promium.egg-info/dependency_links.txt +0 -0
  10. {promium-3.6.3 → promium-3.6.4}/Promium.egg-info/entry_points.txt +0 -0
  11. {promium-3.6.3 → promium-3.6.4}/Promium.egg-info/requires.txt +0 -0
  12. {promium-3.6.3 → promium-3.6.4}/Promium.egg-info/top_level.txt +0 -0
  13. {promium-3.6.3 → promium-3.6.4}/README.rst +0 -0
  14. {promium-3.6.3 → promium-3.6.4}/doc/__init__.py +0 -0
  15. {promium-3.6.3 → promium-3.6.4}/doc/conf.py +0 -0
  16. {promium-3.6.3 → promium-3.6.4}/promium/__init__.py +0 -0
  17. {promium-3.6.3 → promium-3.6.4}/promium/assertions.py +0 -0
  18. {promium-3.6.3 → promium-3.6.4}/promium/base.py +0 -0
  19. {promium-3.6.3 → promium-3.6.4}/promium/common.py +0 -0
  20. {promium-3.6.3 → promium-3.6.4}/promium/device_config.py +0 -0
  21. {promium-3.6.3 → promium-3.6.4}/promium/elements/__init__.py +0 -0
  22. {promium-3.6.3 → promium-3.6.4}/promium/elements/checkbox.py +0 -0
  23. {promium-3.6.3 → promium-3.6.4}/promium/elements/drop_downs.py +0 -0
  24. {promium-3.6.3 → promium-3.6.4}/promium/elements/frame.py +0 -0
  25. {promium-3.6.3 → promium-3.6.4}/promium/elements/input_field.py +0 -0
  26. {promium-3.6.3 → promium-3.6.4}/promium/elements/link.py +0 -0
  27. {promium-3.6.3 → promium-3.6.4}/promium/elements/multiselect_listbox.py +0 -0
  28. {promium-3.6.3 → promium-3.6.4}/promium/elements/radio_button.py +0 -0
  29. {promium-3.6.3 → promium-3.6.4}/promium/elements/textarea_field.py +0 -0
  30. {promium-3.6.3 → promium-3.6.4}/promium/elements/upload_button.py +0 -0
  31. {promium-3.6.3 → promium-3.6.4}/promium/exceptions.py +0 -0
  32. {promium-3.6.3 → promium-3.6.4}/promium/expected_conditions.py +0 -0
  33. {promium-3.6.3 → promium-3.6.4}/promium/helpers.py +0 -0
  34. {promium-3.6.3 → promium-3.6.4}/promium/logger.py +0 -0
  35. {promium-3.6.3 → promium-3.6.4}/promium/support/__init__.py +0 -0
  36. {promium-3.6.3 → promium-3.6.4}/promium/support/settings.py +0 -0
  37. {promium-3.6.3 → promium-3.6.4}/promium/waits.py +0 -0
  38. {promium-3.6.3 → promium-3.6.4}/setup.cfg +0 -0
  39. {promium-3.6.3 → promium-3.6.4}/tests/__init__.py +0 -0
  40. {promium-3.6.3 → promium-3.6.4}/tests/config.py +0 -0
  41. {promium-3.6.3 → promium-3.6.4}/tests/conftest.py +0 -0
  42. {promium-3.6.3 → promium-3.6.4}/tests/pages/__init__.py +0 -0
  43. {promium-3.6.3 → promium-3.6.4}/tests/pages/catalog_404_page.py +0 -0
  44. {promium-3.6.3 → promium-3.6.4}/tests/pages/catalog_gallery_page.py +0 -0
  45. {promium-3.6.3 → promium-3.6.4}/tests/settings/__init__.py +0 -0
  46. {promium-3.6.3 → promium-3.6.4}/tests/settings/test_base.py +0 -0
  47. {promium-3.6.3 → promium-3.6.4}/tests/settings/test_chrome.py +0 -0
  48. {promium-3.6.3 → promium-3.6.4}/tests/settings/test_edge.py +0 -0
  49. {promium-3.6.3 → promium-3.6.4}/tests/settings/test_firefox.py +0 -0
  50. {promium-3.6.3 → promium-3.6.4}/tests/settings/test_ie.py +0 -0
  51. {promium-3.6.3 → promium-3.6.4}/tests/settings/test_opera.py +0 -0
  52. {promium-3.6.3 → promium-3.6.4}/tests/test_catalog_404.py +0 -0
  53. {promium-3.6.3 → promium-3.6.4}/tests/test_catalog_gallery.py +0 -0
  54. {promium-3.6.3 → promium-3.6.4}/tests/test_enviroment.py +0 -0
  55. {promium-3.6.3 → promium-3.6.4}/tests/test_requests.py +0 -0
  56. {promium-3.6.3 → promium-3.6.4}/tests/test_soft_asserts.py +0 -0
  57. {promium-3.6.3 → promium-3.6.4}/tests/test_waits.py +0 -0
  58. {promium-3.6.3 → promium-3.6.4}/tests/urls.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Promium
3
- Version: 3.6.3
3
+ Version: 3.6.4
4
4
  Summary: Selenium wrapper for testing Web UI
5
5
  Author: Denis Korytkin, Nataliia Guieva, Roman Zaporozhets, Vladimir Kritov, Oleh Dykusha
6
6
  Project-URL: Home page, https://none
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Promium
3
- Version: 3.6.3
3
+ Version: 3.6.4
4
4
  Summary: Selenium wrapper for testing Web UI
5
5
  Author: Denis Korytkin, Nataliia Guieva, Roman Zaporozhets, Vladimir Kritov, Oleh Dykusha
6
6
  Project-URL: Home page, https://none
@@ -42,21 +42,6 @@ def get_chrome_opera_options(
42
42
  options.add_argument("--ignore-certificate-errors")
43
43
  options.add_argument("--disable-notifications")
44
44
  options.add_argument("--dns-prefetch-disable")
45
- options.add_argument("--proxy-bypass-list=*ws*;*chat*")
46
- prefs = {
47
- "download.default_directory": DOWNLOAD_PATH,
48
- "download.directory_upgrade": True,
49
- 'prompt_for_download': False,
50
- "profile.default_content_setting_values.cookies": 1,
51
- "profile.block_third_party_cookies": True
52
- }
53
- options.add_experimental_option("prefs", prefs)
54
- options.add_experimental_option("excludeSwitches", [
55
- "enable-automation", # disable the automation bar
56
- ])
57
- # fix use window.onbeforeunload
58
- options.enable_bidi = True
59
- options.unhandled_prompt_behavior = 'ignore'
60
45
 
61
46
  if device.__class__.__name__ == "CustomDevice":
62
47
  mobile_emulation = {
@@ -79,8 +64,10 @@ def get_chrome_opera_options(
79
64
  return options
80
65
 
81
66
 
82
- def get_chrome_options(device, proxy_server=None, is_headless=False):
83
- options = ChromeOptions()
67
+ def get_chrome_options(
68
+ device, proxy_server=None, is_headless=False, default_options=None
69
+ ):
70
+ options = default_options if default_options else ChromeOptions()
84
71
  return get_chrome_opera_options(options, device, proxy_server, is_headless)
85
72
 
86
73
 
@@ -202,7 +189,15 @@ class RemoteBrowser(webdriver.Remote):
202
189
 
203
190
  class ChromeBrowser(webdriver.Chrome):
204
191
 
205
- def __init__(self, *args, device, proxy_server, is_headless, **kwargs):
192
+ def __init__(
193
+ self,
194
+ *args,
195
+ device,
196
+ proxy_server,
197
+ is_headless,
198
+ browser_options=None,
199
+ **kwargs,
200
+ ):
206
201
  """
207
202
  Initialise a new Chrome WebDriver instance.
208
203
  """
@@ -220,7 +215,7 @@ class ChromeBrowser(webdriver.Chrome):
220
215
  capabilities.update(proxy_capabilities.to_capabilities())
221
216
 
222
217
  options = get_chrome_options(
223
- device, proxy_server, is_headless
218
+ device, proxy_server, is_headless, browser_options,
224
219
  )
225
220
  if is_headless:
226
221
  options.accept_insecure_certs = True
@@ -234,7 +234,12 @@ def driver_init(request):
234
234
  proxy_server = request.config.proxy_server
235
235
  else:
236
236
  proxy_server = None
237
- driver = create_driver(device, proxy_server=proxy_server)
237
+ browser_options = getattr(request.cls, "browser_options", None)
238
+ driver = create_driver(
239
+ device,
240
+ proxy_server=proxy_server,
241
+ browser_options=browser_options,
242
+ )
238
243
  driver.xrequestid = request.cls.xrequestid
239
244
  request.cls.driver = request.config.driver = driver
240
245
  request.config.get_fail_debug = _get_fail_debug
@@ -72,7 +72,8 @@ def timeout(seconds=5, error_message=os.strerror(errno.ETIME)):
72
72
 
73
73
  @timeout(300)
74
74
  def create_driver(
75
- device, proxy_server=None, env_var='SE_DRIVER', default='chrome://'
75
+ device, proxy_server=None, env_var='SE_DRIVER', default='chrome://',
76
+ browser_options=None,
76
77
  ):
77
78
  """
78
79
  Examples:
@@ -87,6 +88,8 @@ def create_driver(
87
88
  "proxy_server": proxy_server,
88
89
  "is_headless": os.environ.get("HEADLESS") == "Enabled",
89
90
  }
91
+ if browser_options and 'chrome' in browser_options.__module__:
92
+ driver_options["browser_options"] = browser_options
90
93
 
91
94
  driver_dsn = os.environ.get(env_var) or default
92
95
 
@@ -19,7 +19,7 @@ REQUIREMENTS = [
19
19
 
20
20
  setup(
21
21
  name='Promium',
22
- version='3.6.3',
22
+ version='3.6.4',
23
23
  install_requires=REQUIREMENTS,
24
24
  author='Denis Korytkin, Nataliia Guieva, '
25
25
  'Roman Zaporozhets, Vladimir Kritov, '
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