selenium-base 4.30.8__py3-none-any.whl → 4.46.0__py3-none-any.whl
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.
- {selenium_base-4.30.8.dist-info → selenium_base-4.46.0.dist-info}/METADATA +162 -133
- selenium_base-4.46.0.dist-info/RECORD +4 -0
- {selenium_base-4.30.8.dist-info → selenium_base-4.46.0.dist-info}/WHEEL +1 -1
- selenium_base-4.30.8.dist-info/RECORD +0 -4
- {selenium_base-4.30.8.dist-info → selenium_base-4.46.0.dist-info}/top_level.txt +0 -0
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: selenium-base
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.46.0
|
|
4
4
|
Summary: A complete web automation framework for end-to-end testing.
|
|
5
5
|
Home-page: https://github.com/seleniumbase/SeleniumBase
|
|
6
6
|
Author: Michael Mintz
|
|
7
7
|
Author-email: mdmintz@gmail.com
|
|
8
8
|
Maintainer: Michael Mintz
|
|
9
9
|
License: MIT
|
|
10
|
+
Project-URL: Homepage, https://github.com/seleniumbase/SeleniumBase
|
|
10
11
|
Project-URL: Changelog, https://github.com/seleniumbase/SeleniumBase/releases
|
|
11
12
|
Project-URL: Download, https://pypi.org/project/seleniumbase/#files
|
|
12
|
-
Project-URL: Gitter, https://gitter.im/seleniumbase/SeleniumBase
|
|
13
13
|
Project-URL: Blog, https://seleniumbase.com/
|
|
14
|
+
Project-URL: Discord, https://discord.gg/EdhQTn3EyE
|
|
14
15
|
Project-URL: PyPI, https://pypi.org/project/seleniumbase/
|
|
15
16
|
Project-URL: Source, https://github.com/seleniumbase/SeleniumBase
|
|
17
|
+
Project-URL: Repository, https://github.com/seleniumbase/SeleniumBase
|
|
16
18
|
Project-URL: Documentation, https://seleniumbase.io/
|
|
17
19
|
Platform: Windows
|
|
18
20
|
Platform: Linux
|
|
@@ -25,19 +27,17 @@ Classifier: Environment :: Web Environment
|
|
|
25
27
|
Classifier: Framework :: Pytest
|
|
26
28
|
Classifier: Intended Audience :: Developers
|
|
27
29
|
Classifier: Intended Audience :: Information Technology
|
|
28
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
29
30
|
Classifier: Operating System :: MacOS :: MacOS X
|
|
30
31
|
Classifier: Operating System :: Microsoft :: Windows
|
|
31
32
|
Classifier: Operating System :: POSIX :: Linux
|
|
32
33
|
Classifier: Programming Language :: Python
|
|
33
34
|
Classifier: Programming Language :: Python :: 3
|
|
34
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
35
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
36
35
|
Classifier: Programming Language :: Python :: 3.9
|
|
37
36
|
Classifier: Programming Language :: Python :: 3.10
|
|
38
37
|
Classifier: Programming Language :: Python :: 3.11
|
|
39
38
|
Classifier: Programming Language :: Python :: 3.12
|
|
40
39
|
Classifier: Programming Language :: Python :: 3.13
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
41
41
|
Classifier: Topic :: Internet
|
|
42
42
|
Classifier: Topic :: Scientific/Engineering
|
|
43
43
|
Classifier: Topic :: Software Development
|
|
@@ -49,15 +49,31 @@ Classifier: Topic :: Software Development :: Testing
|
|
|
49
49
|
Classifier: Topic :: Software Development :: Testing :: Acceptance
|
|
50
50
|
Classifier: Topic :: Software Development :: Testing :: Traffic Generation
|
|
51
51
|
Classifier: Topic :: Utilities
|
|
52
|
-
Requires-Python: >=3.
|
|
52
|
+
Requires-Python: >=3.9
|
|
53
53
|
Description-Content-Type: text/markdown
|
|
54
|
-
Requires-Dist: seleniumbase
|
|
54
|
+
Requires-Dist: seleniumbase>=4.46.0
|
|
55
|
+
Dynamic: author
|
|
56
|
+
Dynamic: author-email
|
|
57
|
+
Dynamic: classifier
|
|
58
|
+
Dynamic: home-page
|
|
59
|
+
Dynamic: license
|
|
60
|
+
Dynamic: maintainer
|
|
61
|
+
Dynamic: platform
|
|
62
|
+
Dynamic: requires-dist
|
|
63
|
+
Dynamic: requires-python
|
|
64
|
+
Dynamic: summary
|
|
55
65
|
|
|
56
66
|
**[<img src="https://img.shields.io/badge/pypi-selenium--base-22AAEE.svg" alt="pypi" />](https://pypi.python.org/pypi/selenium-base) is a proxy for [<img src="https://img.shields.io/badge/pypi-seleniumbase-22AAEE.svg" alt="pypi" />](https://pypi.python.org/pypi/seleniumbase)**
|
|
57
67
|
****
|
|
58
68
|
|
|
59
69
|
<!-- SeleniumBase Docs -->
|
|
60
70
|
|
|
71
|
+
<meta property="og:site_name" content="SeleniumBase">
|
|
72
|
+
<meta property="og:title" content="SeleniumBase: Python Web Automation and E2E Testing" />
|
|
73
|
+
<meta property="og:description" content="Fast, easy, and reliable Web/UI testing with Python." />
|
|
74
|
+
<meta property="og:keywords" content="Python, pytest, selenium, webdriver, testing, automation, seleniumbase, framework, dashboard, recorder, reports, screenshots">
|
|
75
|
+
<meta property="og:image" content="https://seleniumbase.github.io/cdn/img/mac_sb_logo_5b.png" />
|
|
76
|
+
<link rel="icon" href="https://seleniumbase.github.io/img/logo7.png" />
|
|
61
77
|
|
|
62
78
|
<h1>SeleniumBase</h1>
|
|
63
79
|
|
|
@@ -71,30 +87,30 @@ Requires-Dist: seleniumbase >=4.30.8
|
|
|
71
87
|
<p align="center">
|
|
72
88
|
<a href="#python_installation">🚀 Start</a> |
|
|
73
89
|
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/features_list.md">🏰 Features</a> |
|
|
74
|
-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/ReadMe.md">📚 Examples</a> |
|
|
75
90
|
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md">🎛️ Options</a> |
|
|
91
|
+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/ReadMe.md">📚 Examples</a> |
|
|
76
92
|
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/console_scripts/ReadMe.md">🌠 Scripts</a> |
|
|
77
93
|
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/mobile_testing.md">📱 Mobile</a>
|
|
78
94
|
<br />
|
|
79
95
|
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md">📘 APIs</a> |
|
|
80
|
-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">
|
|
81
|
-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/ReadMe.md">📊 Dashboard</a> |
|
|
96
|
+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md"> 🔠 Formats</a> |
|
|
82
97
|
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/recorder_mode.md">🔴 Recorder</a> |
|
|
98
|
+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/ReadMe.md">📊 Dashboard</a> |
|
|
83
99
|
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/locale_codes.md">🗾 Locales</a> |
|
|
84
|
-
<a href="https://
|
|
100
|
+
<a href="https://seleniumbase.io/devices/?url=seleniumbase.com">💻 Farm</a>
|
|
85
101
|
<br />
|
|
86
102
|
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/commander.md">🎖️ GUI</a> |
|
|
87
103
|
<a href="https://seleniumbase.io/demo_page">📰 TestPage</a> |
|
|
88
|
-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/case_plans.md">🗂️ CasePlans</a> |
|
|
89
104
|
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md">👤 UC Mode</a> |
|
|
90
|
-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/
|
|
91
|
-
<a href="https://
|
|
105
|
+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md">🐙 CDP Mode</a> |
|
|
106
|
+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/chart_maker/ReadMe.md">📶 Charts</a> |
|
|
107
|
+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/utilities/selenium_grid/ReadMe.md">🌐 Grid</a>
|
|
92
108
|
<br />
|
|
93
109
|
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/how_it_works.md">👁️ How</a> |
|
|
94
110
|
<a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/migration/raw_selenium">🚝 Migrate</a> |
|
|
95
|
-
<a href="https://github.com/seleniumbase/SeleniumBase/
|
|
96
|
-
<a href="https://github.com/seleniumbase/SeleniumBase/tree/master/
|
|
97
|
-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/
|
|
111
|
+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/case_plans.md">🗂️ CasePlans</a> |
|
|
112
|
+
<a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/boilerplates">♻️ Template</a> |
|
|
113
|
+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/master_qa/ReadMe.md">🧬 Hybrid</a> |
|
|
98
114
|
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/ReadMe.md">🚎 Tours</a>
|
|
99
115
|
<br />
|
|
100
116
|
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/github/workflows/ReadMe.md">🤖 CI/CD</a> |
|
|
@@ -112,19 +128,76 @@ Requires-Dist: seleniumbase >=4.30.8
|
|
|
112
128
|
|
|
113
129
|
📚 Learn from [**over 200 examples** in the **SeleniumBase/examples/** folder](https://github.com/seleniumbase/SeleniumBase/tree/master/examples).
|
|
114
130
|
|
|
115
|
-
|
|
131
|
+
🐙 Note that <a translate="no" href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md"><b>UC Mode</b></a> / <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md"><b>CDP Mode</b></a> (Stealth Mode) have their own ReadMe files.
|
|
116
132
|
|
|
117
|
-
ℹ️
|
|
133
|
+
ℹ️ Most scripts run with raw <code translate="no"><b>python</b></code>, although some scripts use <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">Syntax Formats</a> that expect <a href="https://docs.pytest.org/en/latest/how-to/usage.html" translate="no"><b>pytest</b></a> (a Python unit-testing framework included with SeleniumBase that can discover, collect, and run tests automatically).
|
|
118
134
|
|
|
119
|
-
|
|
135
|
+
--------
|
|
120
136
|
|
|
121
|
-
|
|
122
|
-
|
|
137
|
+
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_google.py">raw_google.py</a>, which performs a Google search:</p>
|
|
138
|
+
|
|
139
|
+
```python
|
|
140
|
+
from seleniumbase import SB
|
|
141
|
+
|
|
142
|
+
with SB(test=True, uc=True) as sb:
|
|
143
|
+
sb.open("https://google.com/ncr")
|
|
144
|
+
sb.type('[title="Search"]', "SeleniumBase GitHub page\n")
|
|
145
|
+
sb.click('[href*="github.com/seleniumbase/"]')
|
|
146
|
+
sb.save_screenshot_to_logs() # ./latest_logs/
|
|
147
|
+
print(sb.get_page_title())
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
> `python raw_google.py`
|
|
151
|
+
|
|
152
|
+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_google.py"><img src="https://seleniumbase.github.io/cdn/gif/google_search.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="420" /></a>
|
|
153
|
+
|
|
154
|
+
--------
|
|
155
|
+
|
|
156
|
+
<p align="left">📗 Here's an example of bypassing Cloudflare's challenge page: <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/raw_gitlab.py">SeleniumBase/examples/cdp_mode/raw_gitlab.py</a></p>
|
|
157
|
+
|
|
158
|
+
```python
|
|
159
|
+
from seleniumbase import SB
|
|
160
|
+
|
|
161
|
+
with SB(uc=True, test=True, locale="en") as sb:
|
|
162
|
+
url = "https://gitlab.com/users/sign_in"
|
|
163
|
+
sb.activate_cdp_mode(url)
|
|
164
|
+
sb.uc_gui_click_captcha()
|
|
165
|
+
sb.sleep(2)
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
<img src="https://seleniumbase.github.io/other/cf_sec.jpg" title="SeleniumBase" width="332"> <img src="https://seleniumbase.github.io/other/gitlab_bypass.png" title="SeleniumBase" width="288">
|
|
169
|
+
|
|
170
|
+
--------
|
|
171
|
+
|
|
172
|
+
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_get_swag.py">test_get_swag.py</a>, which tests an e-commerce site:</p>
|
|
173
|
+
|
|
174
|
+
```python
|
|
175
|
+
from seleniumbase import BaseCase
|
|
176
|
+
BaseCase.main(__name__, __file__) # Call pytest
|
|
177
|
+
|
|
178
|
+
class MyTestClass(BaseCase):
|
|
179
|
+
def test_swag_labs(self):
|
|
180
|
+
self.open("https://www.saucedemo.com")
|
|
181
|
+
self.type("#user-name", "standard_user")
|
|
182
|
+
self.type("#password", "secret_sauce\n")
|
|
183
|
+
self.assert_element("div.inventory_list")
|
|
184
|
+
self.click('button[name*="backpack"]')
|
|
185
|
+
self.click("#shopping_cart_container a")
|
|
186
|
+
self.assert_text("Backpack", "div.cart_item")
|
|
187
|
+
self.click("button#checkout")
|
|
188
|
+
self.type("input#first-name", "SeleniumBase")
|
|
189
|
+
self.type("input#last-name", "Automation")
|
|
190
|
+
self.type("input#postal-code", "77123")
|
|
191
|
+
self.click("input#continue")
|
|
192
|
+
self.click("button#finish")
|
|
193
|
+
self.assert_text("Thank you for your order!")
|
|
123
194
|
```
|
|
124
195
|
|
|
125
|
-
|
|
196
|
+
> `pytest test_get_swag.py`
|
|
197
|
+
|
|
198
|
+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_get_swag.py"><img src="https://seleniumbase.github.io/cdn/gif/fast_swag_2.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="480" /></a>
|
|
126
199
|
|
|
127
|
-
>
|
|
200
|
+
> (The default browser is ``--chrome`` if not set.)
|
|
128
201
|
|
|
129
202
|
--------
|
|
130
203
|
|
|
@@ -134,7 +207,7 @@ pytest my_first_test.py
|
|
|
134
207
|
pytest test_coffee_cart.py --demo
|
|
135
208
|
```
|
|
136
209
|
|
|
137
|
-
<p align="left"><a href="https://seleniumbase.io/coffee/" target="_blank"><img src="https://seleniumbase.github.io/cdn/gif/coffee_cart.gif" width="
|
|
210
|
+
<p align="left"><a href="https://seleniumbase.io/coffee/" target="_blank"><img src="https://seleniumbase.github.io/cdn/gif/coffee_cart.gif" width="480" alt="SeleniumBase Coffee Cart Test" title="SeleniumBase Coffee Cart Test" /></a></p>
|
|
138
211
|
|
|
139
212
|
> <p>(<code translate="no">--demo</code> mode slows down tests and highlights actions)</p>
|
|
140
213
|
|
|
@@ -148,7 +221,7 @@ pytest test_coffee_cart.py --demo
|
|
|
148
221
|
pytest test_demo_site.py
|
|
149
222
|
```
|
|
150
223
|
|
|
151
|
-
<p align="left"><a href="https://seleniumbase.io/demo_page" target="_blank"><img src="https://seleniumbase.github.io/cdn/gif/demo_page_5.gif" width="
|
|
224
|
+
<p align="left"><a href="https://seleniumbase.io/demo_page" target="_blank"><img src="https://seleniumbase.github.io/cdn/gif/demo_page_5.gif" width="480" alt="SeleniumBase Example" title="SeleniumBase Example" /></a></p>
|
|
152
225
|
|
|
153
226
|
> Easy to type, click, select, toggle, drag & drop, and more.
|
|
154
227
|
|
|
@@ -218,7 +291,7 @@ With raw Selenium, that requires more code:<br />
|
|
|
218
291
|
|
|
219
292
|
<p>📚 <b>Learn about different ways of writing tests:</b></p>
|
|
220
293
|
|
|
221
|
-
<p align="left"
|
|
294
|
+
<p align="left">📗📝 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_simple_login.py">test_simple_login.py</a>, which uses <code translate="no"><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/fixtures/base_case.py">BaseCase</a></code> class inheritance, and runs with <a href="https://docs.pytest.org/en/latest/how-to/usage.html">pytest</a> or <a href="https://github.com/mdmintz/pynose">pynose</a>. (Use <code translate="no">self.driver</code> to access Selenium's raw <code translate="no">driver</code>.)</p>
|
|
222
295
|
|
|
223
296
|
```python
|
|
224
297
|
from seleniumbase import BaseCase
|
|
@@ -237,22 +310,7 @@ class TestSimpleLogin(BaseCase):
|
|
|
237
310
|
self.assert_text("signed out", "#top_message")
|
|
238
311
|
```
|
|
239
312
|
|
|
240
|
-
<p align="left"
|
|
241
|
-
|
|
242
|
-
```python
|
|
243
|
-
def test_sb_fixture_with_no_class(sb):
|
|
244
|
-
sb.open("seleniumbase.io/simple/login")
|
|
245
|
-
sb.type("#username", "demo_user")
|
|
246
|
-
sb.type("#password", "secret_pass")
|
|
247
|
-
sb.click('a:contains("Sign in")')
|
|
248
|
-
sb.assert_exact_text("Welcome!", "h1")
|
|
249
|
-
sb.assert_element("img#image1")
|
|
250
|
-
sb.highlight("#image1")
|
|
251
|
-
sb.click_link("Sign out")
|
|
252
|
-
sb.assert_text("signed out", "#top_message")
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
<p align="left">📙📝 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_login_sb.py">raw_login_sb.py</a>, which uses the <b><code translate="no">SB</code></b> Context Manager. Runs with pure <code translate="no">python</code>. (Use <code translate="no">sb.driver</code> to access Selenium's raw <code translate="no">driver</code>.)</p>
|
|
313
|
+
<p align="left">📘📝 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_login_sb.py">raw_login_sb.py</a>, which uses the <b><code translate="no">SB</code></b> Context Manager. Runs with pure <code translate="no">python</code>. (Use <code translate="no">sb.driver</code> to access Selenium's raw <code translate="no">driver</code>.)</p>
|
|
256
314
|
|
|
257
315
|
```python
|
|
258
316
|
from seleniumbase import SB
|
|
@@ -269,24 +327,7 @@ with SB() as sb:
|
|
|
269
327
|
sb.assert_text("signed out", "#top_message")
|
|
270
328
|
```
|
|
271
329
|
|
|
272
|
-
<p align="left"
|
|
273
|
-
|
|
274
|
-
```python
|
|
275
|
-
from seleniumbase import DriverContext
|
|
276
|
-
|
|
277
|
-
with DriverContext() as driver:
|
|
278
|
-
driver.open("seleniumbase.io/simple/login")
|
|
279
|
-
driver.type("#username", "demo_user")
|
|
280
|
-
driver.type("#password", "secret_pass")
|
|
281
|
-
driver.click('a:contains("Sign in")')
|
|
282
|
-
driver.assert_exact_text("Welcome!", "h1")
|
|
283
|
-
driver.assert_element("img#image1")
|
|
284
|
-
driver.highlight("#image1")
|
|
285
|
-
driver.click_link("Sign out")
|
|
286
|
-
driver.assert_text("signed out", "#top_message")
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
<p align="left">📔📝 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_login_driver.py">raw_login_driver.py</a>, which uses the <b><code translate="no">Driver</code></b> Manager. Runs with pure <code translate="no">python</code>. (The <code>driver</code> is an improved version of Selenium's raw <code translate="no">driver</code>, with more methods.)</p>
|
|
330
|
+
<p align="left">📙📝 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_login_driver.py">raw_login_driver.py</a>, which uses the <b><code translate="no">Driver</code></b> Manager. Runs with pure <code translate="no">python</code>. (The <code>driver</code> is an improved version of Selenium's raw <code translate="no">driver</code>, with more methods.)</p>
|
|
290
331
|
|
|
291
332
|
```python
|
|
292
333
|
from seleniumbase import Driver
|
|
@@ -306,23 +347,6 @@ finally:
|
|
|
306
347
|
driver.quit()
|
|
307
348
|
```
|
|
308
349
|
|
|
309
|
-
<p align="left">📕📝 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/behave_bdd/features/login_app.feature">login_app.feature</a>, which uses <a translate="no" href="https://behave.readthedocs.io/en/stable/gherkin.html#features" target="_blank">behave-BDD Gherkin</a> syntax. Runs with <code translate="no">behave</code>. (<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/behave_bdd/ReadMe.md">Learn about the <b>SeleniumBase behave-BDD</b> integration</a>)</p>
|
|
310
|
-
|
|
311
|
-
```gherkin
|
|
312
|
-
Feature: SeleniumBase scenarios for the Simple App
|
|
313
|
-
|
|
314
|
-
Scenario: Verify the Simple App (Login / Logout)
|
|
315
|
-
Given Open "seleniumbase.io/simple/login"
|
|
316
|
-
And Type "demo_user" into "#username"
|
|
317
|
-
And Type "secret_pass" into "#password"
|
|
318
|
-
And Click 'a:contains("Sign in")'
|
|
319
|
-
And Assert exact text "Welcome!" in "h1"
|
|
320
|
-
And Assert element "img#image1"
|
|
321
|
-
And Highlight "#image1"
|
|
322
|
-
And Click link "Sign out"
|
|
323
|
-
And Assert text "signed out" in "#top_message"
|
|
324
|
-
```
|
|
325
|
-
|
|
326
350
|
--------
|
|
327
351
|
|
|
328
352
|
<a id="python_installation"></a>
|
|
@@ -367,48 +391,49 @@ pip install -e .
|
|
|
367
391
|
🔵 **Type ``seleniumbase`` or ``sbase`` to verify that SeleniumBase was installed successfully:**
|
|
368
392
|
|
|
369
393
|
```bash
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
COMMANDS:
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
394
|
+
___ _ _ ___
|
|
395
|
+
/ __| ___| |___ _ _ (_)_ _ _ __ | _ ) __ _ ______
|
|
396
|
+
\__ \/ -_) / -_) ' \| | \| | ' \ | _ \/ _` (_-< -_)
|
|
397
|
+
|___/\___|_\___|_||_|_|\_,_|_|_|_\|___/\__,_/__|___|
|
|
398
|
+
----------------------------------------------------
|
|
399
|
+
|
|
400
|
+
╭──────────────────────────────────────────────────╮
|
|
401
|
+
│ * USAGE: "seleniumbase [COMMAND] [PARAMETERS]" │
|
|
402
|
+
│ * OR: "sbase [COMMAND] [PARAMETERS]" │
|
|
403
|
+
│ │
|
|
404
|
+
│ COMMANDS: PARAMETERS / DESCRIPTIONS: │
|
|
405
|
+
│ get / install [DRIVER_NAME] [OPTIONS] │
|
|
406
|
+
│ methods (List common Python methods) │
|
|
407
|
+
│ options (List common pytest options) │
|
|
408
|
+
│ behave-options (List common behave options) │
|
|
409
|
+
│ gui / commander [OPTIONAL PATH or TEST FILE] │
|
|
410
|
+
│ behave-gui (SBase Commander for Behave) │
|
|
411
|
+
│ caseplans [OPTIONAL PATH or TEST FILE] │
|
|
412
|
+
│ mkdir [DIRECTORY] [OPTIONS] │
|
|
413
|
+
│ mkfile [FILE.py] [OPTIONS] │
|
|
414
|
+
│ mkrec / codegen [FILE.py] [OPTIONS] │
|
|
415
|
+
│ recorder (Open Recorder Desktop App.) │
|
|
416
|
+
│ record (If args: mkrec. Else: App.) │
|
|
417
|
+
│ mkpres [FILE.py] [LANG] │
|
|
418
|
+
│ mkchart [FILE.py] [LANG] │
|
|
419
|
+
│ print [FILE] [OPTIONS] │
|
|
420
|
+
│ translate [SB_FILE.py] [LANG] [ACTION] │
|
|
421
|
+
│ convert [WEBDRIVER_UNITTEST_FILE.py] │
|
|
422
|
+
│ extract-objects [SB_FILE.py] │
|
|
423
|
+
│ inject-objects [SB_FILE.py] [OPTIONS] │
|
|
424
|
+
│ objectify [SB_FILE.py] [OPTIONS] │
|
|
425
|
+
│ revert-objects [SB_FILE.py] [OPTIONS] │
|
|
426
|
+
│ encrypt / obfuscate │
|
|
427
|
+
│ decrypt / unobfuscate │
|
|
428
|
+
│ proxy (Start a basic proxy server) │
|
|
429
|
+
│ download server (Get Selenium Grid JAR file) │
|
|
430
|
+
│ grid-hub [start|stop] [OPTIONS] │
|
|
431
|
+
│ grid-node [start|stop] --hub=[HOST/IP] │
|
|
432
|
+
│ │
|
|
433
|
+
│ * EXAMPLE => "sbase get chromedriver stable" │
|
|
434
|
+
│ * For command info => "sbase help [COMMAND]" │
|
|
435
|
+
│ * For info on all commands => "sbase --help" │
|
|
436
|
+
╰──────────────────────────────────────────────────╯
|
|
412
437
|
```
|
|
413
438
|
|
|
414
439
|
<h3>🔵 Downloading webdrivers:</h3>
|
|
@@ -420,20 +445,21 @@ COMMANDS:
|
|
|
420
445
|
<summary> ▶️ Here's sample output from a chromedriver download. (<b>click to expand</b>)</summary>
|
|
421
446
|
|
|
422
447
|
```bash
|
|
423
|
-
*** chromedriver to download =
|
|
448
|
+
*** chromedriver to download = 131.0.6778.108 (Latest Stable)
|
|
424
449
|
|
|
425
450
|
Downloading chromedriver-mac-arm64.zip from:
|
|
426
|
-
https://storage.googleapis.com/chrome-for-testing-public/
|
|
451
|
+
https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.108/mac-arm64/chromedriver-mac-arm64.zip ...
|
|
427
452
|
Download Complete!
|
|
428
453
|
|
|
429
454
|
Extracting ['chromedriver'] from chromedriver-mac-arm64.zip ...
|
|
430
455
|
Unzip Complete!
|
|
431
456
|
|
|
432
457
|
The file [chromedriver] was saved to:
|
|
433
|
-
|
|
458
|
+
~/github/SeleniumBase/seleniumbase/drivers/
|
|
459
|
+
chromedriver
|
|
434
460
|
|
|
435
|
-
Making [chromedriver
|
|
436
|
-
[chromedriver
|
|
461
|
+
Making [chromedriver 131.0.6778.108] executable ...
|
|
462
|
+
[chromedriver 131.0.6778.108] is now ready for use!
|
|
437
463
|
```
|
|
438
464
|
|
|
439
465
|
</details>
|
|
@@ -451,9 +477,9 @@ cd examples/
|
|
|
451
477
|
pytest my_first_test.py
|
|
452
478
|
```
|
|
453
479
|
|
|
454
|
-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py"><img src="https://seleniumbase.github.io/cdn/gif/fast_swag_2.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="
|
|
480
|
+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py"><img src="https://seleniumbase.github.io/cdn/gif/fast_swag_2.gif" alt="SeleniumBase Test" title="SeleniumBase Test" width="480" /></a>
|
|
455
481
|
|
|
456
|
-
<p align="left"><b>Here's the code for <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py">my_first_test.py</a>:</b></p>
|
|
482
|
+
<p align="left"><b>Here's the full code for <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py">my_first_test.py</a>:</b></p>
|
|
457
483
|
|
|
458
484
|
```python
|
|
459
485
|
from seleniumbase import BaseCase
|
|
@@ -705,10 +731,12 @@ pytest test_coffee_cart.py --trace
|
|
|
705
731
|
--sjw # (Skip JS Waits for readyState to be "complete" or Angular to load.)
|
|
706
732
|
--wfa # (Wait for AngularJS to be done loading after specific web actions.)
|
|
707
733
|
--pls=PLS # (Set pageLoadStrategy on Chrome: "normal", "eager", or "none".)
|
|
708
|
-
--headless # (
|
|
709
|
-
--
|
|
734
|
+
--headless # (The default headless mode. Linux uses this mode by default.)
|
|
735
|
+
--headless1 # (Use Chrome's old headless mode. Fast, but has limitations.)
|
|
736
|
+
--headless2 # (Use Chrome's new headless mode, which supports extensions.)
|
|
710
737
|
--headed # (Run tests in headed/GUI mode on Linux OS, where not default.)
|
|
711
738
|
--xvfb # (Run tests using the Xvfb virtual display server on Linux OS.)
|
|
739
|
+
--xvfb-metrics=STRING # (Set Xvfb display size on Linux: "Width,Height".)
|
|
712
740
|
--locale=LOCALE_CODE # (Set the Language Locale Code for the web browser.)
|
|
713
741
|
--interval=SECONDS # (The autoplay interval for presentations & tour steps)
|
|
714
742
|
--start-page=URL # (The starting URL for the web browser when tests begin.)
|
|
@@ -731,6 +759,7 @@ pytest test_coffee_cart.py --trace
|
|
|
731
759
|
--rec-behave # (Same as Recorder Mode, but also generates behave-gherkin.)
|
|
732
760
|
--rec-sleep # (If the Recorder is enabled, also records self.sleep calls.)
|
|
733
761
|
--rec-print # (If the Recorder is enabled, prints output after tests end.)
|
|
762
|
+
--disable-cookies # (Disable Cookies on websites. Pages might break!)
|
|
734
763
|
--disable-js # (Disable JavaScript on websites. Pages might break!)
|
|
735
764
|
--disable-csp # (Disable the Content Security Policy of websites.)
|
|
736
765
|
--disable-ws # (Disable Web Security on Chromium-based browsers.)
|
|
@@ -753,6 +782,7 @@ pytest test_coffee_cart.py --trace
|
|
|
753
782
|
--rcs | --reuse-class-session # (Reuse session for tests in class.)
|
|
754
783
|
--crumbs # (Delete all cookies between tests reusing a session.)
|
|
755
784
|
--disable-beforeunload # (Disable the "beforeunload" event on Chrome.)
|
|
785
|
+
--window-position=X,Y # (Set the browser's starting window position.)
|
|
756
786
|
--window-size=WIDTH,HEIGHT # (Set the browser's starting window size.)
|
|
757
787
|
--maximize # (Start tests with the browser window maximized.)
|
|
758
788
|
--screenshot # (Save a screenshot at the end of each test.)
|
|
@@ -865,7 +895,7 @@ You can run it from the ``examples/`` folder like this:
|
|
|
865
895
|
pytest test_fail.py
|
|
866
896
|
```
|
|
867
897
|
|
|
868
|
-
🔵 You'll notice that a logs folder,
|
|
898
|
+
🔵 You'll notice that a logs folder, ``./latest_logs/``, was created to hold information (and screenshots) about the failing test. During test runs, past results get moved to the archived_logs folder if you have ARCHIVE_EXISTING_LOGS set to True in [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py), or if your run tests with ``--archive-logs``. If you choose not to archive existing logs, they will be deleted and replaced by the logs of the latest test run.
|
|
869
899
|
|
|
870
900
|
--------
|
|
871
901
|
|
|
@@ -921,7 +951,7 @@ pytest test_suite.py --dashboard --html=report.html
|
|
|
921
951
|
|
|
922
952
|
<img src="https://seleniumbase.github.io/cdn/img/dash_report.jpg" alt="Dashboard Pytest HTML Report" title="Dashboard Pytest HTML Report" width="520" />
|
|
923
953
|
|
|
924
|
-
If viewing pytest html reports in [Jenkins](https://www.jenkins.io/), you may need to [configure Jenkins settings](https://stackoverflow.com/a/46197356) for the html to render correctly. This is due to [Jenkins CSP changes](https://www.jenkins.io/doc/book/system-administration/security/configuring-content-security-policy/).
|
|
954
|
+
If viewing pytest html reports in [Jenkins](https://www.jenkins.io/), you may need to [configure Jenkins settings](https://stackoverflow.com/a/46197356/7058266) for the html to render correctly. This is due to [Jenkins CSP changes](https://www.jenkins.io/doc/book/system-administration/security/configuring-content-security-policy/).
|
|
925
955
|
|
|
926
956
|
You can also use ``--junit-xml=report.xml`` to get an xml report instead. Jenkins can use this file to display better reporting for your tests.
|
|
927
957
|
|
|
@@ -1423,7 +1453,6 @@ pytest --reruns=1 --reruns-delay=1
|
|
|
1423
1453
|
<span><a href="https://github.com/seleniumbase/SeleniumBase"><img src="https://seleniumbase.github.io/img/social/share_github.svg" title="SeleniumBase on GitHub" alt="SeleniumBase on GitHub" width="64" /></a></span>
|
|
1424
1454
|
<span><a href="https://discord.gg/EdhQTn3EyE"><img src="https://seleniumbase.github.io/other/discord_icon.png" title="SeleniumBase on Discord" alt="SeleniumBase on Discord" width="66" /></a></span>
|
|
1425
1455
|
<span><a href="https://www.facebook.com/SeleniumBase"><img src="https://seleniumbase.io/img/social/share_facebook.svg" title="SeleniumBase on Facebook" alt="SeleniumBase on Facebook" width="62" /></a></span>
|
|
1426
|
-
<span><a href="https://gitter.im/seleniumbase/SeleniumBase" target="_blank"><img src="https://seleniumbase.github.io/img/social/share_gitter.svg" title="SeleniumBase on Gitter" alt="SeleniumBase on Gitter" width="48" /></a></span>
|
|
1427
1456
|
</div></p>
|
|
1428
1457
|
|
|
1429
1458
|
<p><div><b><a href="https://github.com/mdmintz">https://github.com/mdmintz</a></b></div></p>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
selenium_base-4.46.0.dist-info/METADATA,sha256=P8bit6gnx3mHaAbm7aqTUxqmkkx-RexsgmuaC0sND4g,80766
|
|
2
|
+
selenium_base-4.46.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
3
|
+
selenium_base-4.46.0.dist-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
4
|
+
selenium_base-4.46.0.dist-info/RECORD,,
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
selenium_base-4.30.8.dist-info/METADATA,sha256=zVBlrIKCEV10LPkKk3wYQNAPeT0IKh9ih749Qwaf7xY,79660
|
|
2
|
-
selenium_base-4.30.8.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
3
|
-
selenium_base-4.30.8.dist-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
4
|
-
selenium_base-4.30.8.dist-info/RECORD,,
|
|
File without changes
|