Promium 3.5.2__tar.gz → 3.6.1__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 (61) hide show
  1. promium-3.6.1/PKG-INFO +183 -0
  2. promium-3.6.1/Promium.egg-info/PKG-INFO +183 -0
  3. promium-3.6.1/README.rst +155 -0
  4. {Promium-3.5.2 → promium-3.6.1}/doc/conf.py +2 -2
  5. {Promium-3.5.2 → promium-3.6.1}/promium/browsers.py +3 -0
  6. {Promium-3.5.2 → promium-3.6.1}/promium/plugin.py +1 -1
  7. {Promium-3.5.2 → promium-3.6.1}/setup.py +2 -2
  8. {Promium-3.5.2 → promium-3.6.1}/tests/test_enviroment.py +1 -0
  9. Promium-3.5.2/PKG-INFO +0 -210
  10. Promium-3.5.2/Promium.egg-info/PKG-INFO +0 -210
  11. Promium-3.5.2/README.rst +0 -182
  12. {Promium-3.5.2 → promium-3.6.1}/LICENSE +0 -0
  13. {Promium-3.5.2 → promium-3.6.1}/Promium.egg-info/SOURCES.txt +0 -0
  14. {Promium-3.5.2 → promium-3.6.1}/Promium.egg-info/dependency_links.txt +0 -0
  15. {Promium-3.5.2 → promium-3.6.1}/Promium.egg-info/entry_points.txt +0 -0
  16. {Promium-3.5.2 → promium-3.6.1}/Promium.egg-info/requires.txt +0 -0
  17. {Promium-3.5.2 → promium-3.6.1}/Promium.egg-info/top_level.txt +0 -0
  18. {Promium-3.5.2 → promium-3.6.1}/doc/__init__.py +0 -0
  19. {Promium-3.5.2 → promium-3.6.1}/promium/__init__.py +0 -0
  20. {Promium-3.5.2 → promium-3.6.1}/promium/assertions.py +0 -0
  21. {Promium-3.5.2 → promium-3.6.1}/promium/base.py +0 -0
  22. {Promium-3.5.2 → promium-3.6.1}/promium/common.py +0 -0
  23. {Promium-3.5.2 → promium-3.6.1}/promium/device_config.py +0 -0
  24. {Promium-3.5.2 → promium-3.6.1}/promium/elements/__init__.py +0 -0
  25. {Promium-3.5.2 → promium-3.6.1}/promium/elements/checkbox.py +0 -0
  26. {Promium-3.5.2 → promium-3.6.1}/promium/elements/drop_downs.py +0 -0
  27. {Promium-3.5.2 → promium-3.6.1}/promium/elements/frame.py +0 -0
  28. {Promium-3.5.2 → promium-3.6.1}/promium/elements/input_field.py +0 -0
  29. {Promium-3.5.2 → promium-3.6.1}/promium/elements/link.py +0 -0
  30. {Promium-3.5.2 → promium-3.6.1}/promium/elements/multiselect_listbox.py +0 -0
  31. {Promium-3.5.2 → promium-3.6.1}/promium/elements/radio_button.py +0 -0
  32. {Promium-3.5.2 → promium-3.6.1}/promium/elements/textarea_field.py +0 -0
  33. {Promium-3.5.2 → promium-3.6.1}/promium/elements/upload_button.py +0 -0
  34. {Promium-3.5.2 → promium-3.6.1}/promium/exceptions.py +0 -0
  35. {Promium-3.5.2 → promium-3.6.1}/promium/expected_conditions.py +0 -0
  36. {Promium-3.5.2 → promium-3.6.1}/promium/helpers.py +0 -0
  37. {Promium-3.5.2 → promium-3.6.1}/promium/logger.py +0 -0
  38. {Promium-3.5.2 → promium-3.6.1}/promium/support/__init__.py +0 -0
  39. {Promium-3.5.2 → promium-3.6.1}/promium/support/settings.py +0 -0
  40. {Promium-3.5.2 → promium-3.6.1}/promium/test_case.py +0 -0
  41. {Promium-3.5.2 → promium-3.6.1}/promium/waits.py +0 -0
  42. {Promium-3.5.2 → promium-3.6.1}/setup.cfg +0 -0
  43. {Promium-3.5.2 → promium-3.6.1}/tests/__init__.py +0 -0
  44. {Promium-3.5.2 → promium-3.6.1}/tests/config.py +0 -0
  45. {Promium-3.5.2 → promium-3.6.1}/tests/conftest.py +0 -0
  46. {Promium-3.5.2 → promium-3.6.1}/tests/pages/__init__.py +0 -0
  47. {Promium-3.5.2 → promium-3.6.1}/tests/pages/catalog_404_page.py +0 -0
  48. {Promium-3.5.2 → promium-3.6.1}/tests/pages/catalog_gallery_page.py +0 -0
  49. {Promium-3.5.2 → promium-3.6.1}/tests/settings/__init__.py +0 -0
  50. {Promium-3.5.2 → promium-3.6.1}/tests/settings/test_base.py +0 -0
  51. {Promium-3.5.2 → promium-3.6.1}/tests/settings/test_chrome.py +0 -0
  52. {Promium-3.5.2 → promium-3.6.1}/tests/settings/test_edge.py +0 -0
  53. {Promium-3.5.2 → promium-3.6.1}/tests/settings/test_firefox.py +0 -0
  54. {Promium-3.5.2 → promium-3.6.1}/tests/settings/test_ie.py +0 -0
  55. {Promium-3.5.2 → promium-3.6.1}/tests/settings/test_opera.py +0 -0
  56. {Promium-3.5.2 → promium-3.6.1}/tests/test_catalog_404.py +0 -0
  57. {Promium-3.5.2 → promium-3.6.1}/tests/test_catalog_gallery.py +0 -0
  58. {Promium-3.5.2 → promium-3.6.1}/tests/test_requests.py +0 -0
  59. {Promium-3.5.2 → promium-3.6.1}/tests/test_soft_asserts.py +0 -0
  60. {Promium-3.5.2 → promium-3.6.1}/tests/test_waits.py +0 -0
  61. {Promium-3.5.2 → promium-3.6.1}/tests/urls.py +0 -0
promium-3.6.1/PKG-INFO ADDED
@@ -0,0 +1,183 @@
1
+ Metadata-Version: 2.1
2
+ Name: Promium
3
+ Version: 3.6.1
4
+ Summary: Selenium wrapper for testing Web UI
5
+ Author: Denis Korytkin, Nataliia Guieva, Roman Zaporozhets, Vladimir Kritov, Oleh Dykusha
6
+ Project-URL: Home page, https://none
7
+ Project-URL: Documentation, https://none
8
+ Keywords: Testing UI,Selenium,PageObject,Selenium wrapper
9
+ Platform: linux
10
+ Classifier: Programming Language :: Python :: 3.13
11
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
12
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
13
+ Classifier: Topic :: Software Development :: Testing
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Requires-Python: >=3.10, <4
17
+ License-File: LICENSE
18
+ Requires-Dist: six>=1.10.0
19
+ Requires-Dist: json_checker>=1.2.1
20
+ Requires-Dist: urllib3>=2.0.2
21
+ Requires-Dist: py>=1.5.2
22
+ Requires-Dist: pytest>=5.0.0
23
+ Requires-Dist: pytest_rerunfailures>=4.1.0
24
+ Requires-Dist: pytest-forked>=0.2
25
+ Requires-Dist: pytest-instafail>=0.3.0
26
+ Requires-Dist: deepdiff>=5.7.0
27
+ Requires-Dist: selenium>=4.10.0
28
+
29
+ Promium
30
+ =======
31
+
32
+ .. image:: https://img.shields.io/badge/Python%3A%203.13-blue
33
+ :target: https://pypi.org/project/Promium/
34
+
35
+ .. image:: https://badge.fury.io/py/Promium.svg
36
+ :target: https://badge.fury.io/py/Promium
37
+
38
+ Promium is a simple Selenium wrapper designed to facilitate writing UI tests.
39
+
40
+ `Promium Documentation <https://qa-automation.git-doc.evo.dev/promium>`_
41
+
42
+ Overview
43
+ --------
44
+
45
+ Promium simplifies the UI testing process using Selenium. The framework is designed for ease of test creation and provides essential tools for working with elements, pages, and test cases. Supports Python 3.13 and works on Linux and macOS.
46
+
47
+ Installation and Setup
48
+ ----------------------
49
+
50
+ **System Requirements**
51
+
52
+ - Python 3.13
53
+ - Systems: Linux, macOS
54
+
55
+ To install all dependencies:
56
+
57
+ .. code-block:: text
58
+
59
+ pip install -r requirements.txt
60
+
61
+ **Install Promium**
62
+
63
+ .. code-block:: text
64
+
65
+ pip install promium
66
+
67
+ **Driver and Chrome Setup**
68
+
69
+ To use Promium with Chrome, both Google Chrome and ChromeDriver need to be installed. Use the following commands to set up Chrome and ChromeDriver:
70
+
71
+ .. code-block:: text
72
+
73
+ ARG CHROME_MILESTONE=130
74
+
75
+ #============================================
76
+ # Google Chrome
77
+ #============================================
78
+ RUN CHROME_VERSION=$(curl -s https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_${CHROME_MILESTONE}) && \
79
+ curl -Lo /tmp/chrome-linux.zip https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/${CHROME_VERSION}/linux64/chrome-linux64.zip && \
80
+ apt-get install -y unzip && \
81
+ unzip /tmp/chrome-linux.zip -d /usr/local/ && \
82
+ ln -s /usr/local/chrome-linux64/chrome /usr/local/bin/google-chrome && \
83
+ rm /tmp/chrome-linux.zip
84
+
85
+ #============================================
86
+ # ChromeDriver
87
+ #============================================
88
+ RUN CHROME_DRIVER_VERSION=$(curl -s https://googlechromelabs.github.io/chrome-for-testing/latest-versions-per-milestone.json | python3 -c "import sys, json; print(json.load(sys.stdin)['milestones'][str(${CHROME_MILESTONE})]['version'])") && \
89
+ wget --no-verbose -O /tmp/chromedriver_linux64.zip https://storage.googleapis.com/chrome-for-testing-public/${CHROME_DRIVER_VERSION}/linux64/chromedriver-linux64.zip && \
90
+ unzip /tmp/chromedriver_linux64.zip -d /opt/selenium && \
91
+ ln -fs /opt/selenium/chromedriver-linux64/chromedriver /usr/bin/chromedriver && \
92
+ rm /tmp/chromedriver_linux64.zip
93
+
94
+ Usage Examples
95
+ --------------
96
+
97
+ Below is a basic example of how to define a page object and run a simple test. For more examples, refer to the `Examples Documentation <https://github.com/your-repo-path/promium/doc/examples.md>`_.
98
+
99
+ **Page Object Example**
100
+
101
+ .. code-block:: text
102
+
103
+ from selenium.webdriver.common.by import By
104
+ from promium import Page, Block, Element, InputField, Link
105
+
106
+ class ResultBlock(Block):
107
+ title = Link(By.CSS_SELECTOR, 'h3')
108
+ link = Element(By.CSS_SELECTOR, '.f')
109
+ description = Element(By.CSS_SELECTOR, '.st')
110
+ tags = Element.as_list(By.CSS_SELECTOR, '.osl .fl')
111
+
112
+ class GoogleResultPage(Page):
113
+ results_blocks = ResultBlock.as_list(By.CSS_SELECTOR, '#rso .srg div.g')
114
+
115
+ class GoogleMainPage(Page):
116
+ url = 'https://google.com'
117
+ logo = Element(By.CSS_SELECTOR, '#hplogo')
118
+ search_input = InputField(By.CSS_SELECTOR, '[name="q"]')
119
+
120
+ def search(self, text):
121
+ self.search_input.send_keys(text)
122
+ self.search_input.submit()
123
+ return GoogleResultPage(self.driver)
124
+
125
+
126
+ **Test Example**
127
+
128
+ .. code-block:: text
129
+
130
+ from promium.test_case import WebDriverTestCase
131
+ from tests.pages.google_page import GoogleMainPage
132
+
133
+ class TestMainGooglePage(WebDriverTestCase):
134
+ def test_search(self):
135
+ main_page = GoogleMainPage(self.driver)
136
+ main_page.open()
137
+ self.soft_assert_element_is_displayed(main_page.logo)
138
+ result_page = main_page.search('Selenium')
139
+ result_block = result_page.results_blocks.first_item
140
+ self.soft_assert_in('Selenium', result_block.title.text)
141
+
142
+
143
+ **Run a Simple Test**
144
+
145
+ .. code-block:: text
146
+
147
+ # all tests
148
+ pytest tests/
149
+
150
+ # all tests in suite
151
+ pytest tests/test_google.py
152
+
153
+ # only one test
154
+ pytest tests/test_google.py -k test_search
155
+
156
+ Development and Testing
157
+ -----------------------
158
+
159
+ To set up a development environment and run tests, use the following commands:
160
+
161
+ - **Build Docker Image**: `docker build -t promium/base-env .`
162
+ - **Run Tests**: `docker-compose run test-se`
163
+ - **Check Linting**: `docker-compose run flake8`
164
+
165
+ Additional Documentation
166
+ ------------------------
167
+
168
+ For detailed information on using and configuring Promium, refer to the following documentation files:
169
+
170
+
171
+ - `Assertions <./doc/assertions.md>`_ - Description of available assertion methods for validating test conditions.
172
+ - `CI Setup <./doc/ci.md>`_ - Configuration of CI/CD for automating integration processes.
173
+ - `Commands <./doc/command.md>`_ - List of available commands and their usage within the framework.
174
+ - `Containers <./doc/containers.md>`_ - Information on setting up and using containers for an isolated testing environment.
175
+ - `Devices(emulation) <./doc/device.md>`_ - Description of supported devices and configurations.
176
+ - `Drivers <./doc/driver.md>`_ - Configuration of drivers for browser interaction.
177
+ - `Elements <./doc/element.md>`_ - Working with web elements and their properties.
178
+ - `Examples <./doc/examples.md>`_ - Sample tests and scenarios to get started with the framework.
179
+ - `Exceptions <./doc/exceptions.md>`_ - Handling exceptions and errors during testing.
180
+ - `Test Cases <./doc/test_case.md>`_ - Creating and structuring test cases in Promium.
181
+
182
+
183
+
@@ -0,0 +1,183 @@
1
+ Metadata-Version: 2.1
2
+ Name: Promium
3
+ Version: 3.6.1
4
+ Summary: Selenium wrapper for testing Web UI
5
+ Author: Denis Korytkin, Nataliia Guieva, Roman Zaporozhets, Vladimir Kritov, Oleh Dykusha
6
+ Project-URL: Home page, https://none
7
+ Project-URL: Documentation, https://none
8
+ Keywords: Testing UI,Selenium,PageObject,Selenium wrapper
9
+ Platform: linux
10
+ Classifier: Programming Language :: Python :: 3.13
11
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
12
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
13
+ Classifier: Topic :: Software Development :: Testing
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Requires-Python: >=3.10, <4
17
+ License-File: LICENSE
18
+ Requires-Dist: six>=1.10.0
19
+ Requires-Dist: json_checker>=1.2.1
20
+ Requires-Dist: urllib3>=2.0.2
21
+ Requires-Dist: py>=1.5.2
22
+ Requires-Dist: pytest>=5.0.0
23
+ Requires-Dist: pytest_rerunfailures>=4.1.0
24
+ Requires-Dist: pytest-forked>=0.2
25
+ Requires-Dist: pytest-instafail>=0.3.0
26
+ Requires-Dist: deepdiff>=5.7.0
27
+ Requires-Dist: selenium>=4.10.0
28
+
29
+ Promium
30
+ =======
31
+
32
+ .. image:: https://img.shields.io/badge/Python%3A%203.13-blue
33
+ :target: https://pypi.org/project/Promium/
34
+
35
+ .. image:: https://badge.fury.io/py/Promium.svg
36
+ :target: https://badge.fury.io/py/Promium
37
+
38
+ Promium is a simple Selenium wrapper designed to facilitate writing UI tests.
39
+
40
+ `Promium Documentation <https://qa-automation.git-doc.evo.dev/promium>`_
41
+
42
+ Overview
43
+ --------
44
+
45
+ Promium simplifies the UI testing process using Selenium. The framework is designed for ease of test creation and provides essential tools for working with elements, pages, and test cases. Supports Python 3.13 and works on Linux and macOS.
46
+
47
+ Installation and Setup
48
+ ----------------------
49
+
50
+ **System Requirements**
51
+
52
+ - Python 3.13
53
+ - Systems: Linux, macOS
54
+
55
+ To install all dependencies:
56
+
57
+ .. code-block:: text
58
+
59
+ pip install -r requirements.txt
60
+
61
+ **Install Promium**
62
+
63
+ .. code-block:: text
64
+
65
+ pip install promium
66
+
67
+ **Driver and Chrome Setup**
68
+
69
+ To use Promium with Chrome, both Google Chrome and ChromeDriver need to be installed. Use the following commands to set up Chrome and ChromeDriver:
70
+
71
+ .. code-block:: text
72
+
73
+ ARG CHROME_MILESTONE=130
74
+
75
+ #============================================
76
+ # Google Chrome
77
+ #============================================
78
+ RUN CHROME_VERSION=$(curl -s https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_${CHROME_MILESTONE}) && \
79
+ curl -Lo /tmp/chrome-linux.zip https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/${CHROME_VERSION}/linux64/chrome-linux64.zip && \
80
+ apt-get install -y unzip && \
81
+ unzip /tmp/chrome-linux.zip -d /usr/local/ && \
82
+ ln -s /usr/local/chrome-linux64/chrome /usr/local/bin/google-chrome && \
83
+ rm /tmp/chrome-linux.zip
84
+
85
+ #============================================
86
+ # ChromeDriver
87
+ #============================================
88
+ RUN CHROME_DRIVER_VERSION=$(curl -s https://googlechromelabs.github.io/chrome-for-testing/latest-versions-per-milestone.json | python3 -c "import sys, json; print(json.load(sys.stdin)['milestones'][str(${CHROME_MILESTONE})]['version'])") && \
89
+ wget --no-verbose -O /tmp/chromedriver_linux64.zip https://storage.googleapis.com/chrome-for-testing-public/${CHROME_DRIVER_VERSION}/linux64/chromedriver-linux64.zip && \
90
+ unzip /tmp/chromedriver_linux64.zip -d /opt/selenium && \
91
+ ln -fs /opt/selenium/chromedriver-linux64/chromedriver /usr/bin/chromedriver && \
92
+ rm /tmp/chromedriver_linux64.zip
93
+
94
+ Usage Examples
95
+ --------------
96
+
97
+ Below is a basic example of how to define a page object and run a simple test. For more examples, refer to the `Examples Documentation <https://github.com/your-repo-path/promium/doc/examples.md>`_.
98
+
99
+ **Page Object Example**
100
+
101
+ .. code-block:: text
102
+
103
+ from selenium.webdriver.common.by import By
104
+ from promium import Page, Block, Element, InputField, Link
105
+
106
+ class ResultBlock(Block):
107
+ title = Link(By.CSS_SELECTOR, 'h3')
108
+ link = Element(By.CSS_SELECTOR, '.f')
109
+ description = Element(By.CSS_SELECTOR, '.st')
110
+ tags = Element.as_list(By.CSS_SELECTOR, '.osl .fl')
111
+
112
+ class GoogleResultPage(Page):
113
+ results_blocks = ResultBlock.as_list(By.CSS_SELECTOR, '#rso .srg div.g')
114
+
115
+ class GoogleMainPage(Page):
116
+ url = 'https://google.com'
117
+ logo = Element(By.CSS_SELECTOR, '#hplogo')
118
+ search_input = InputField(By.CSS_SELECTOR, '[name="q"]')
119
+
120
+ def search(self, text):
121
+ self.search_input.send_keys(text)
122
+ self.search_input.submit()
123
+ return GoogleResultPage(self.driver)
124
+
125
+
126
+ **Test Example**
127
+
128
+ .. code-block:: text
129
+
130
+ from promium.test_case import WebDriverTestCase
131
+ from tests.pages.google_page import GoogleMainPage
132
+
133
+ class TestMainGooglePage(WebDriverTestCase):
134
+ def test_search(self):
135
+ main_page = GoogleMainPage(self.driver)
136
+ main_page.open()
137
+ self.soft_assert_element_is_displayed(main_page.logo)
138
+ result_page = main_page.search('Selenium')
139
+ result_block = result_page.results_blocks.first_item
140
+ self.soft_assert_in('Selenium', result_block.title.text)
141
+
142
+
143
+ **Run a Simple Test**
144
+
145
+ .. code-block:: text
146
+
147
+ # all tests
148
+ pytest tests/
149
+
150
+ # all tests in suite
151
+ pytest tests/test_google.py
152
+
153
+ # only one test
154
+ pytest tests/test_google.py -k test_search
155
+
156
+ Development and Testing
157
+ -----------------------
158
+
159
+ To set up a development environment and run tests, use the following commands:
160
+
161
+ - **Build Docker Image**: `docker build -t promium/base-env .`
162
+ - **Run Tests**: `docker-compose run test-se`
163
+ - **Check Linting**: `docker-compose run flake8`
164
+
165
+ Additional Documentation
166
+ ------------------------
167
+
168
+ For detailed information on using and configuring Promium, refer to the following documentation files:
169
+
170
+
171
+ - `Assertions <./doc/assertions.md>`_ - Description of available assertion methods for validating test conditions.
172
+ - `CI Setup <./doc/ci.md>`_ - Configuration of CI/CD for automating integration processes.
173
+ - `Commands <./doc/command.md>`_ - List of available commands and their usage within the framework.
174
+ - `Containers <./doc/containers.md>`_ - Information on setting up and using containers for an isolated testing environment.
175
+ - `Devices(emulation) <./doc/device.md>`_ - Description of supported devices and configurations.
176
+ - `Drivers <./doc/driver.md>`_ - Configuration of drivers for browser interaction.
177
+ - `Elements <./doc/element.md>`_ - Working with web elements and their properties.
178
+ - `Examples <./doc/examples.md>`_ - Sample tests and scenarios to get started with the framework.
179
+ - `Exceptions <./doc/exceptions.md>`_ - Handling exceptions and errors during testing.
180
+ - `Test Cases <./doc/test_case.md>`_ - Creating and structuring test cases in Promium.
181
+
182
+
183
+
@@ -0,0 +1,155 @@
1
+ Promium
2
+ =======
3
+
4
+ .. image:: https://img.shields.io/badge/Python%3A%203.13-blue
5
+ :target: https://pypi.org/project/Promium/
6
+
7
+ .. image:: https://badge.fury.io/py/Promium.svg
8
+ :target: https://badge.fury.io/py/Promium
9
+
10
+ Promium is a simple Selenium wrapper designed to facilitate writing UI tests.
11
+
12
+ `Promium Documentation <https://qa-automation.git-doc.evo.dev/promium>`_
13
+
14
+ Overview
15
+ --------
16
+
17
+ Promium simplifies the UI testing process using Selenium. The framework is designed for ease of test creation and provides essential tools for working with elements, pages, and test cases. Supports Python 3.13 and works on Linux and macOS.
18
+
19
+ Installation and Setup
20
+ ----------------------
21
+
22
+ **System Requirements**
23
+
24
+ - Python 3.13
25
+ - Systems: Linux, macOS
26
+
27
+ To install all dependencies:
28
+
29
+ .. code-block:: text
30
+
31
+ pip install -r requirements.txt
32
+
33
+ **Install Promium**
34
+
35
+ .. code-block:: text
36
+
37
+ pip install promium
38
+
39
+ **Driver and Chrome Setup**
40
+
41
+ To use Promium with Chrome, both Google Chrome and ChromeDriver need to be installed. Use the following commands to set up Chrome and ChromeDriver:
42
+
43
+ .. code-block:: text
44
+
45
+ ARG CHROME_MILESTONE=130
46
+
47
+ #============================================
48
+ # Google Chrome
49
+ #============================================
50
+ RUN CHROME_VERSION=$(curl -s https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_${CHROME_MILESTONE}) && \
51
+ curl -Lo /tmp/chrome-linux.zip https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/${CHROME_VERSION}/linux64/chrome-linux64.zip && \
52
+ apt-get install -y unzip && \
53
+ unzip /tmp/chrome-linux.zip -d /usr/local/ && \
54
+ ln -s /usr/local/chrome-linux64/chrome /usr/local/bin/google-chrome && \
55
+ rm /tmp/chrome-linux.zip
56
+
57
+ #============================================
58
+ # ChromeDriver
59
+ #============================================
60
+ RUN CHROME_DRIVER_VERSION=$(curl -s https://googlechromelabs.github.io/chrome-for-testing/latest-versions-per-milestone.json | python3 -c "import sys, json; print(json.load(sys.stdin)['milestones'][str(${CHROME_MILESTONE})]['version'])") && \
61
+ wget --no-verbose -O /tmp/chromedriver_linux64.zip https://storage.googleapis.com/chrome-for-testing-public/${CHROME_DRIVER_VERSION}/linux64/chromedriver-linux64.zip && \
62
+ unzip /tmp/chromedriver_linux64.zip -d /opt/selenium && \
63
+ ln -fs /opt/selenium/chromedriver-linux64/chromedriver /usr/bin/chromedriver && \
64
+ rm /tmp/chromedriver_linux64.zip
65
+
66
+ Usage Examples
67
+ --------------
68
+
69
+ Below is a basic example of how to define a page object and run a simple test. For more examples, refer to the `Examples Documentation <https://github.com/your-repo-path/promium/doc/examples.md>`_.
70
+
71
+ **Page Object Example**
72
+
73
+ .. code-block:: text
74
+
75
+ from selenium.webdriver.common.by import By
76
+ from promium import Page, Block, Element, InputField, Link
77
+
78
+ class ResultBlock(Block):
79
+ title = Link(By.CSS_SELECTOR, 'h3')
80
+ link = Element(By.CSS_SELECTOR, '.f')
81
+ description = Element(By.CSS_SELECTOR, '.st')
82
+ tags = Element.as_list(By.CSS_SELECTOR, '.osl .fl')
83
+
84
+ class GoogleResultPage(Page):
85
+ results_blocks = ResultBlock.as_list(By.CSS_SELECTOR, '#rso .srg div.g')
86
+
87
+ class GoogleMainPage(Page):
88
+ url = 'https://google.com'
89
+ logo = Element(By.CSS_SELECTOR, '#hplogo')
90
+ search_input = InputField(By.CSS_SELECTOR, '[name="q"]')
91
+
92
+ def search(self, text):
93
+ self.search_input.send_keys(text)
94
+ self.search_input.submit()
95
+ return GoogleResultPage(self.driver)
96
+
97
+
98
+ **Test Example**
99
+
100
+ .. code-block:: text
101
+
102
+ from promium.test_case import WebDriverTestCase
103
+ from tests.pages.google_page import GoogleMainPage
104
+
105
+ class TestMainGooglePage(WebDriverTestCase):
106
+ def test_search(self):
107
+ main_page = GoogleMainPage(self.driver)
108
+ main_page.open()
109
+ self.soft_assert_element_is_displayed(main_page.logo)
110
+ result_page = main_page.search('Selenium')
111
+ result_block = result_page.results_blocks.first_item
112
+ self.soft_assert_in('Selenium', result_block.title.text)
113
+
114
+
115
+ **Run a Simple Test**
116
+
117
+ .. code-block:: text
118
+
119
+ # all tests
120
+ pytest tests/
121
+
122
+ # all tests in suite
123
+ pytest tests/test_google.py
124
+
125
+ # only one test
126
+ pytest tests/test_google.py -k test_search
127
+
128
+ Development and Testing
129
+ -----------------------
130
+
131
+ To set up a development environment and run tests, use the following commands:
132
+
133
+ - **Build Docker Image**: `docker build -t promium/base-env .`
134
+ - **Run Tests**: `docker-compose run test-se`
135
+ - **Check Linting**: `docker-compose run flake8`
136
+
137
+ Additional Documentation
138
+ ------------------------
139
+
140
+ For detailed information on using and configuring Promium, refer to the following documentation files:
141
+
142
+
143
+ - `Assertions <./doc/assertions.md>`_ - Description of available assertion methods for validating test conditions.
144
+ - `CI Setup <./doc/ci.md>`_ - Configuration of CI/CD for automating integration processes.
145
+ - `Commands <./doc/command.md>`_ - List of available commands and their usage within the framework.
146
+ - `Containers <./doc/containers.md>`_ - Information on setting up and using containers for an isolated testing environment.
147
+ - `Devices(emulation) <./doc/device.md>`_ - Description of supported devices and configurations.
148
+ - `Drivers <./doc/driver.md>`_ - Configuration of drivers for browser interaction.
149
+ - `Elements <./doc/element.md>`_ - Working with web elements and their properties.
150
+ - `Examples <./doc/examples.md>`_ - Sample tests and scenarios to get started with the framework.
151
+ - `Exceptions <./doc/exceptions.md>`_ - Handling exceptions and errors during testing.
152
+ - `Test Cases <./doc/test_case.md>`_ - Creating and structuring test cases in Promium.
153
+
154
+
155
+
@@ -6,7 +6,7 @@ extensions = [
6
6
  'sphinx.ext.intersphinx',
7
7
  'sphinxemoji.sphinxemoji',
8
8
  'sphinx_autobuild',
9
- 'myst_parser',
9
+ # 'myst_parser',
10
10
  ]
11
11
  intersphinx_mapping = {
12
12
  'python': ('https://docs.python.org/3.7', None),
@@ -18,7 +18,7 @@ source_parsers = {
18
18
  '.md': 'recommonmark.parser.CommonMarkParser',
19
19
  }
20
20
 
21
- html_theme = 'sphinx_rtd_theme'
21
+ # html_theme = 'sphinx_rtd_theme'
22
22
  html_theme_options = {
23
23
  'display_version': False,
24
24
  }
@@ -51,6 +51,9 @@ def get_chrome_opera_options(
51
51
  "profile.block_third_party_cookies": True
52
52
  }
53
53
  options.add_experimental_option("prefs", prefs)
54
+ # fix use window.onbeforeunload
55
+ options.enable_bidi = True
56
+ options.unhandled_prompt_behavior = 'ignore'
54
57
 
55
58
  if device.__class__.__name__ == "CustomDevice":
56
59
  mobile_emulation = {
@@ -102,7 +102,7 @@ def pytest_addoption(parser):
102
102
  "--repeat",
103
103
  action="store",
104
104
  default=1,
105
- type="int",
105
+ type=int,
106
106
  metavar='repeat',
107
107
  help='Number of times to repeat each test. Mostly for debug purposes'
108
108
  )
@@ -19,7 +19,7 @@ REQUIREMENTS = [
19
19
 
20
20
  setup(
21
21
  name='Promium',
22
- version='3.5.2',
22
+ version='3.6.1',
23
23
  install_requires=REQUIREMENTS,
24
24
  author='Denis Korytkin, Nataliia Guieva, '
25
25
  'Roman Zaporozhets, Vladimir Kritov, '
@@ -36,7 +36,7 @@ setup(
36
36
  entry_points={'pytest11': ['promium = promium.plugin']},
37
37
  python_requires='>=3.10, <4',
38
38
  classifiers=[
39
- 'Programming Language :: Python :: 3.12',
39
+ 'Programming Language :: Python :: 3.13',
40
40
  'Topic :: Software Development :: Libraries :: Python Modules',
41
41
  'Topic :: Software Development :: Libraries :: Application Frameworks',
42
42
  'Topic :: Software Development :: Testing',
@@ -47,6 +47,7 @@ def docs_fixture(scope='function'):
47
47
  class TestEnvironment():
48
48
 
49
49
  @pytest.mark.env
50
+ @pytest.mark.skip('pass')
50
51
  def test_check_doc_command(self, docs_fixture):
51
52
  run_command(['sphinx-build', '-b', 'html', 'doc', 'public'])
52
53
  assert os.path.exists('public/index.html'), 'Not Create doc files'