Promium 3.4.0__tar.gz → 3.4.2__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.4.0 → Promium-3.4.2}/PKG-INFO +1 -1
  2. {Promium-3.4.0 → Promium-3.4.2}/Promium.egg-info/PKG-INFO +1 -1
  3. {Promium-3.4.0 → Promium-3.4.2}/promium/base.py +2 -1
  4. {Promium-3.4.0 → Promium-3.4.2}/promium/test_case.py +12 -1
  5. {Promium-3.4.0 → Promium-3.4.2}/setup.py +1 -1
  6. {Promium-3.4.0 → Promium-3.4.2}/tests/test_requests.py +5 -5
  7. {Promium-3.4.0 → Promium-3.4.2}/LICENSE +0 -0
  8. {Promium-3.4.0 → Promium-3.4.2}/Promium.egg-info/SOURCES.txt +0 -0
  9. {Promium-3.4.0 → Promium-3.4.2}/Promium.egg-info/dependency_links.txt +0 -0
  10. {Promium-3.4.0 → Promium-3.4.2}/Promium.egg-info/entry_points.txt +0 -0
  11. {Promium-3.4.0 → Promium-3.4.2}/Promium.egg-info/requires.txt +0 -0
  12. {Promium-3.4.0 → Promium-3.4.2}/Promium.egg-info/top_level.txt +0 -0
  13. {Promium-3.4.0 → Promium-3.4.2}/README.rst +0 -0
  14. {Promium-3.4.0 → Promium-3.4.2}/doc/__init__.py +0 -0
  15. {Promium-3.4.0 → Promium-3.4.2}/doc/conf.py +0 -0
  16. {Promium-3.4.0 → Promium-3.4.2}/promium/__init__.py +0 -0
  17. {Promium-3.4.0 → Promium-3.4.2}/promium/assertions.py +0 -0
  18. {Promium-3.4.0 → Promium-3.4.2}/promium/browsers.py +0 -0
  19. {Promium-3.4.0 → Promium-3.4.2}/promium/common.py +0 -0
  20. {Promium-3.4.0 → Promium-3.4.2}/promium/device_config.py +0 -0
  21. {Promium-3.4.0 → Promium-3.4.2}/promium/elements/__init__.py +0 -0
  22. {Promium-3.4.0 → Promium-3.4.2}/promium/elements/checkbox.py +0 -0
  23. {Promium-3.4.0 → Promium-3.4.2}/promium/elements/drop_downs.py +0 -0
  24. {Promium-3.4.0 → Promium-3.4.2}/promium/elements/frame.py +0 -0
  25. {Promium-3.4.0 → Promium-3.4.2}/promium/elements/input_field.py +0 -0
  26. {Promium-3.4.0 → Promium-3.4.2}/promium/elements/link.py +0 -0
  27. {Promium-3.4.0 → Promium-3.4.2}/promium/elements/multiselect_listbox.py +0 -0
  28. {Promium-3.4.0 → Promium-3.4.2}/promium/elements/radio_button.py +0 -0
  29. {Promium-3.4.0 → Promium-3.4.2}/promium/elements/textarea_field.py +0 -0
  30. {Promium-3.4.0 → Promium-3.4.2}/promium/elements/upload_button.py +0 -0
  31. {Promium-3.4.0 → Promium-3.4.2}/promium/exceptions.py +0 -0
  32. {Promium-3.4.0 → Promium-3.4.2}/promium/expected_conditions.py +0 -0
  33. {Promium-3.4.0 → Promium-3.4.2}/promium/helpers.py +0 -0
  34. {Promium-3.4.0 → Promium-3.4.2}/promium/logger.py +0 -0
  35. {Promium-3.4.0 → Promium-3.4.2}/promium/plugin.py +0 -0
  36. {Promium-3.4.0 → Promium-3.4.2}/promium/support/__init__.py +0 -0
  37. {Promium-3.4.0 → Promium-3.4.2}/promium/support/settings.py +0 -0
  38. {Promium-3.4.0 → Promium-3.4.2}/promium/waits.py +0 -0
  39. {Promium-3.4.0 → Promium-3.4.2}/setup.cfg +0 -0
  40. {Promium-3.4.0 → Promium-3.4.2}/tests/__init__.py +0 -0
  41. {Promium-3.4.0 → Promium-3.4.2}/tests/config.py +0 -0
  42. {Promium-3.4.0 → Promium-3.4.2}/tests/conftest.py +0 -0
  43. {Promium-3.4.0 → Promium-3.4.2}/tests/pages/__init__.py +0 -0
  44. {Promium-3.4.0 → Promium-3.4.2}/tests/pages/catalog_404_page.py +0 -0
  45. {Promium-3.4.0 → Promium-3.4.2}/tests/pages/catalog_gallery_page.py +0 -0
  46. {Promium-3.4.0 → Promium-3.4.2}/tests/settings/__init__.py +0 -0
  47. {Promium-3.4.0 → Promium-3.4.2}/tests/settings/test_base.py +0 -0
  48. {Promium-3.4.0 → Promium-3.4.2}/tests/settings/test_chrome.py +0 -0
  49. {Promium-3.4.0 → Promium-3.4.2}/tests/settings/test_edge.py +0 -0
  50. {Promium-3.4.0 → Promium-3.4.2}/tests/settings/test_firefox.py +0 -0
  51. {Promium-3.4.0 → Promium-3.4.2}/tests/settings/test_ie.py +0 -0
  52. {Promium-3.4.0 → Promium-3.4.2}/tests/settings/test_opera.py +0 -0
  53. {Promium-3.4.0 → Promium-3.4.2}/tests/test_catalog_404.py +0 -0
  54. {Promium-3.4.0 → Promium-3.4.2}/tests/test_catalog_gallery.py +0 -0
  55. {Promium-3.4.0 → Promium-3.4.2}/tests/test_enviroment.py +0 -0
  56. {Promium-3.4.0 → Promium-3.4.2}/tests/test_soft_asserts.py +0 -0
  57. {Promium-3.4.0 → Promium-3.4.2}/tests/test_waits.py +0 -0
  58. {Promium-3.4.0 → Promium-3.4.2}/tests/urls.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Promium
3
- Version: 3.4.0
3
+ Version: 3.4.2
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.4.0
3
+ Version: 3.4.2
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
@@ -114,9 +114,10 @@ def get_web_driver(driver): # TODO: delete
114
114
 
115
115
  class Page(object):
116
116
 
117
- def __init__(self, driver):
117
+ def __init__(self, driver, monkeypatch=None):
118
118
  self._driver = driver
119
119
  self.previous_window_handle = self.driver.current_window_handle
120
+ self.monkeypatch = monkeypatch
120
121
 
121
122
  url = None
122
123
 
@@ -3,6 +3,8 @@ import errno
3
3
  import os
4
4
  import signal
5
5
  import threading
6
+ import urllib.parse
7
+
6
8
  import urllib3
7
9
  import pytest
8
10
  import logging
@@ -261,7 +263,16 @@ class RequestTestCase(TestCase, RequestSoftAssertion):
261
263
  f'status: {response.status}'
262
264
  )
263
265
  else:
264
- self.session.session_cookie = response.headers.get('set-cookie')
266
+ cookies = response.headers.get("set-cookie")
267
+ if hasattr(self.session, 'session_cookie'):
268
+ self.session.session_cookie += f'; {cookies}'
269
+ else:
270
+ self.session.session_cookie = cookies
265
271
  break
266
272
 
273
+ # fix display full url
274
+ parser = urllib.parse.urlparse(url)
275
+ if not response.url.startswith('http') and 'http' in parser.scheme:
276
+ response.url = f'{parser.scheme}://{parser.netloc}{response.url}'
277
+
267
278
  return response
@@ -19,7 +19,7 @@ REQUIREMENTS = [
19
19
 
20
20
  setup(
21
21
  name='Promium',
22
- version='3.4.0',
22
+ version='3.4.2',
23
23
  install_requires=REQUIREMENTS,
24
24
  author='Denis Korytkin, Nataliia Guieva, '
25
25
  'Roman Zaporozhets, Vladimir Kritov, '
@@ -9,18 +9,18 @@ class TestMainPage(RequestTestCase):
9
9
  test_case_url = 'some url with test case'
10
10
 
11
11
  def test_google_search_block(self):
12
- page_text = self.get_response('https://google.com.ua').data
12
+ page_text = self.get_response('https://prom.ua/ua/').data
13
13
  soup = BeautifulSoup(page_text, "html.parser")
14
14
 
15
- search_input = soup.find(attrs={'name': 'q'})
15
+ search_input = soup.find(attrs={'name': 'search_term'})
16
16
  self.soft_assert_true(
17
17
  search_input,
18
18
  'Не найдена строка поиска'
19
19
  )
20
20
 
21
- search_btn = soup.find(attrs={'name': 'btnG'})
21
+ search_btn = soup.find(attrs={'data-qaid': 'search_btn'})
22
22
  self.soft_assert_equals(
23
- search_btn.get('value'),
24
- 'Пошук Google',
23
+ search_btn.text,
24
+ 'Знайти',
25
25
  'Не правильное название кнопки поиска'
26
26
  )
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