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.
- {Promium-3.4.0 → Promium-3.4.2}/PKG-INFO +1 -1
- {Promium-3.4.0 → Promium-3.4.2}/Promium.egg-info/PKG-INFO +1 -1
- {Promium-3.4.0 → Promium-3.4.2}/promium/base.py +2 -1
- {Promium-3.4.0 → Promium-3.4.2}/promium/test_case.py +12 -1
- {Promium-3.4.0 → Promium-3.4.2}/setup.py +1 -1
- {Promium-3.4.0 → Promium-3.4.2}/tests/test_requests.py +5 -5
- {Promium-3.4.0 → Promium-3.4.2}/LICENSE +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/Promium.egg-info/SOURCES.txt +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/Promium.egg-info/dependency_links.txt +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/Promium.egg-info/entry_points.txt +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/Promium.egg-info/requires.txt +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/Promium.egg-info/top_level.txt +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/README.rst +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/doc/__init__.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/doc/conf.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/promium/__init__.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/promium/assertions.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/promium/browsers.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/promium/common.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/promium/device_config.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/promium/elements/__init__.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/promium/elements/checkbox.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/promium/elements/drop_downs.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/promium/elements/frame.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/promium/elements/input_field.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/promium/elements/link.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/promium/elements/multiselect_listbox.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/promium/elements/radio_button.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/promium/elements/textarea_field.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/promium/elements/upload_button.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/promium/exceptions.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/promium/expected_conditions.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/promium/helpers.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/promium/logger.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/promium/plugin.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/promium/support/__init__.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/promium/support/settings.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/promium/waits.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/setup.cfg +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/tests/__init__.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/tests/config.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/tests/conftest.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/tests/pages/__init__.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/tests/pages/catalog_404_page.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/tests/pages/catalog_gallery_page.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/tests/settings/__init__.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/tests/settings/test_base.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/tests/settings/test_chrome.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/tests/settings/test_edge.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/tests/settings/test_firefox.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/tests/settings/test_ie.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/tests/settings/test_opera.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/tests/test_catalog_404.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/tests/test_catalog_gallery.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/tests/test_enviroment.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/tests/test_soft_asserts.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/tests/test_waits.py +0 -0
- {Promium-3.4.0 → Promium-3.4.2}/tests/urls.py +0 -0
|
@@ -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
|
-
|
|
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
|
|
@@ -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://
|
|
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': '
|
|
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={'
|
|
21
|
+
search_btn = soup.find(attrs={'data-qaid': 'search_btn'})
|
|
22
22
|
self.soft_assert_equals(
|
|
23
|
-
search_btn.
|
|
24
|
-
'
|
|
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
|
|
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
|