pytest-seleniumbase 4.33.12__py3-none-any.whl → 4.33.14__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.

Potentially problematic release.


This version of pytest-seleniumbase might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: pytest-seleniumbase
3
- Version: 4.33.12
3
+ Version: 4.33.14
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
@@ -52,7 +52,17 @@ Classifier: Topic :: Software Development :: Testing :: Traffic Generation
52
52
  Classifier: Topic :: Utilities
53
53
  Requires-Python: >=3.8
54
54
  Description-Content-Type: text/markdown
55
- Requires-Dist: seleniumbase>=4.33.12
55
+ Requires-Dist: seleniumbase>=4.33.14
56
+ Dynamic: author
57
+ Dynamic: author-email
58
+ Dynamic: classifier
59
+ Dynamic: home-page
60
+ Dynamic: license
61
+ Dynamic: maintainer
62
+ Dynamic: platform
63
+ Dynamic: requires-dist
64
+ Dynamic: requires-python
65
+ Dynamic: summary
56
66
 
57
67
  **[<img src="https://img.shields.io/badge/pypi-pytest--seleniumbase-22AAEE.svg" alt="pypi" />](https://pypi.python.org/pypi/pytest-seleniumbase) is a proxy for [<img src="https://img.shields.io/badge/pypi-seleniumbase-22AAEE.svg" alt="pypi" />](https://pypi.python.org/pypi/seleniumbase)**
58
68
  ****
@@ -119,21 +129,76 @@ Requires-Dist: seleniumbase>=4.33.12
119
129
 
120
130
  📚 Learn from [**over 200 examples** in the **SeleniumBase/examples/** folder](https://github.com/seleniumbase/SeleniumBase/tree/master/examples).
121
131
 
122
- 👤 Note that <span translate="no">SeleniumBase</span> <a translate="no" href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md"><b>UC Mode</b> (Stealth Mode) has its own ReadMe</a>.
132
+ 🐙 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.
123
133
 
124
- 🐙 Also note that Seleniumbase <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md"><b>CDP Mode</b> has its own separate ReadMe</a>.
134
+ ℹ️ 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).
125
135
 
126
- ℹ️ Scripts can be called via <code translate="no"><b>python</b></code>, although some <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">Syntax Formats</a> 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).
136
+ --------
127
137
 
128
- <p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py">my_first_test.py</a>, which tests login, shopping, and checkout:</p>
138
+ <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>
129
139
 
130
- ```bash
131
- pytest my_first_test.py
140
+ ```python
141
+ from seleniumbase import SB
142
+
143
+ with SB(test=True) as sb:
144
+ sb.open("https://google.com/ncr")
145
+ sb.type('[title="Search"]', "SeleniumBase GitHub page\n")
146
+ sb.click('[href*="github.com/seleniumbase/"]')
147
+ sb.save_screenshot_to_logs() # ./latest_logs/
148
+ print(sb.get_page_title())
132
149
  ```
133
150
 
134
- <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="520" /></a>
151
+ > `python raw_google.py`
152
+
153
+ <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>
154
+
155
+ --------
156
+
157
+ <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>
135
158
 
136
- > ``pytest`` uses ``--chrome`` by default unless set differently.
159
+ ```python
160
+ from seleniumbase import SB
161
+
162
+ with SB(uc=True, test=True, locale_code="en") as sb:
163
+ url = "https://gitlab.com/users/sign_in"
164
+ sb.activate_cdp_mode(url)
165
+ sb.uc_gui_click_captcha()
166
+ sb.sleep(2)
167
+ ```
168
+
169
+ <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">
170
+
171
+ --------
172
+
173
+ <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>
174
+
175
+ ```python
176
+ from seleniumbase import BaseCase
177
+ BaseCase.main(__name__, __file__) # Call pytest
178
+
179
+ class MyTestClass(BaseCase):
180
+ def test_swag_labs(self):
181
+ self.open("https://www.saucedemo.com")
182
+ self.type("#user-name", "standard_user")
183
+ self.type("#password", "secret_sauce\n")
184
+ self.assert_element("div.inventory_list")
185
+ self.click('button[name*="backpack"]')
186
+ self.click("#shopping_cart_container a")
187
+ self.assert_text("Backpack", "div.cart_item")
188
+ self.click("button#checkout")
189
+ self.type("input#first-name", "SeleniumBase")
190
+ self.type("input#last-name", "Automation")
191
+ self.type("input#postal-code", "77123")
192
+ self.click("input#continue")
193
+ self.click("button#finish")
194
+ self.assert_text("Thank you for your order!")
195
+ ```
196
+
197
+ > `pytest test_get_swag.py`
198
+
199
+ <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>
200
+
201
+ > (The default browser is ``--chrome`` if not set.)
137
202
 
138
203
  --------
139
204
 
@@ -143,7 +208,7 @@ pytest my_first_test.py
143
208
  pytest test_coffee_cart.py --demo
144
209
  ```
145
210
 
146
- <p align="left"><a href="https://seleniumbase.io/coffee/" target="_blank"><img src="https://seleniumbase.github.io/cdn/gif/coffee_cart.gif" width="520" alt="SeleniumBase Coffee Cart Test" title="SeleniumBase Coffee Cart Test" /></a></p>
211
+ <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>
147
212
 
148
213
  > <p>(<code translate="no">--demo</code> mode slows down tests and highlights actions)</p>
149
214
 
@@ -157,7 +222,7 @@ pytest test_coffee_cart.py --demo
157
222
  pytest test_demo_site.py
158
223
  ```
159
224
 
160
- <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="520" alt="SeleniumBase Example" title="SeleniumBase Example" /></a></p>
225
+ <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>
161
226
 
162
227
  > Easy to type, click, select, toggle, drag & drop, and more.
163
228
 
@@ -227,7 +292,7 @@ With raw Selenium, that requires more code:<br />
227
292
 
228
293
  <p>📚 <b>Learn about different ways of writing tests:</b></p>
229
294
 
230
- <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>
295
+ <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>
231
296
 
232
297
  ```python
233
298
  from seleniumbase import BaseCase
@@ -246,22 +311,7 @@ class TestSimpleLogin(BaseCase):
246
311
  self.assert_text("signed out", "#top_message")
247
312
  ```
248
313
 
249
- <p align="left">📗📝 Here's a test from <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/sb_fixture_tests.py">sb_fixture_tests.py</a>, which uses the <b><code translate="no">sb</code></b> <code translate="no">pytest</code> fixture. Runs with <a href="https://docs.pytest.org/en/latest/how-to/usage.html">pytest</a>. (Use <code translate="no">sb.driver</code> to access Selenium's raw <code translate="no">driver</code>.)</p>
250
-
251
- ```python
252
- def test_sb_fixture_with_no_class(sb):
253
- sb.open("seleniumbase.io/simple/login")
254
- sb.type("#username", "demo_user")
255
- sb.type("#password", "secret_pass")
256
- sb.click('a:contains("Sign in")')
257
- sb.assert_exact_text("Welcome!", "h1")
258
- sb.assert_element("img#image1")
259
- sb.highlight("#image1")
260
- sb.click_link("Sign out")
261
- sb.assert_text("signed out", "#top_message")
262
- ```
263
-
264
- <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>
314
+ <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>
265
315
 
266
316
  ```python
267
317
  from seleniumbase import SB
@@ -278,24 +328,7 @@ with SB() as sb:
278
328
  sb.assert_text("signed out", "#top_message")
279
329
  ```
280
330
 
281
- <p align="left">📔📝 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_login_context.py">raw_login_context.py</a>, which uses the <b><code translate="no">DriverContext</code></b> Manager. Runs with pure <code translate="no">python</code>. (The <code translate="no">driver</code> is an improved version of Selenium's raw <code translate="no">driver</code>, with more methods.)</p>
282
-
283
- ```python
284
- from seleniumbase import DriverContext
285
-
286
- with DriverContext() as driver:
287
- driver.open("seleniumbase.io/simple/login")
288
- driver.type("#username", "demo_user")
289
- driver.type("#password", "secret_pass")
290
- driver.click('a:contains("Sign in")')
291
- driver.assert_exact_text("Welcome!", "h1")
292
- driver.assert_element("img#image1")
293
- driver.highlight("#image1")
294
- driver.click_link("Sign out")
295
- driver.assert_text("signed out", "#top_message")
296
- ```
297
-
298
- <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>
331
+ <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>
299
332
 
300
333
  ```python
301
334
  from seleniumbase import Driver
@@ -315,23 +348,6 @@ finally:
315
348
  driver.quit()
316
349
  ```
317
350
 
318
- <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>
319
-
320
- ```gherkin
321
- Feature: SeleniumBase scenarios for the Simple App
322
-
323
- Scenario: Verify the Simple App (Login / Logout)
324
- Given Open "seleniumbase.io/simple/login"
325
- And Type "demo_user" into "#username"
326
- And Type "secret_pass" into "#password"
327
- And Click 'a:contains("Sign in")'
328
- And Assert exact text "Welcome!" in "h1"
329
- And Assert element "img#image1"
330
- And Highlight "#image1"
331
- And Click link "Sign out"
332
- And Assert text "signed out" in "#top_message"
333
- ```
334
-
335
351
  --------
336
352
 
337
353
  <a id="python_installation"></a>
@@ -430,20 +446,21 @@ pip install -e .
430
446
  <summary> ▶️ Here's sample output from a chromedriver download. (<b>click to expand</b>)</summary>
431
447
 
432
448
  ```bash
433
- *** chromedriver to download = 121.0.6167.85 (Latest Stable)
449
+ *** chromedriver to download = 131.0.6778.108 (Latest Stable)
434
450
 
435
451
  Downloading chromedriver-mac-arm64.zip from:
436
- https://storage.googleapis.com/chrome-for-testing-public/121.0.6167.85/mac-arm64/chromedriver-mac-arm64.zip ...
452
+ https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.108/mac-arm64/chromedriver-mac-arm64.zip ...
437
453
  Download Complete!
438
454
 
439
455
  Extracting ['chromedriver'] from chromedriver-mac-arm64.zip ...
440
456
  Unzip Complete!
441
457
 
442
458
  The file [chromedriver] was saved to:
443
- /Users/michael/github/SeleniumBase/seleniumbase/drivers/chromedriver
459
+ ~/github/SeleniumBase/seleniumbase/drivers/
460
+ chromedriver
444
461
 
445
- Making [chromedriver 121.0.6167.85] executable ...
446
- [chromedriver 121.0.6167.85] is now ready for use!
462
+ Making [chromedriver 131.0.6778.108] executable ...
463
+ [chromedriver 131.0.6778.108] is now ready for use!
447
464
  ```
448
465
 
449
466
  </details>
@@ -461,9 +478,9 @@ cd examples/
461
478
  pytest my_first_test.py
462
479
  ```
463
480
 
464
- <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="520" /></a>
481
+ <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>
465
482
 
466
- <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>
483
+ <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>
467
484
 
468
485
  ```python
469
486
  from seleniumbase import BaseCase
@@ -879,7 +896,7 @@ You can run it from the ``examples/`` folder like this:
879
896
  pytest test_fail.py
880
897
  ```
881
898
 
882
- 🔵 You'll notice that a logs folder, "latest_logs", was created to hold information about the failing test, and screenshots. 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.
899
+ 🔵 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.
883
900
 
884
901
  --------
885
902
 
@@ -0,0 +1,4 @@
1
+ pytest_seleniumbase-4.33.14.dist-info/METADATA,sha256=YqVcKzD_SggDzB0AYobhIXB6EdjEmh6E9NJeAWYrlKY,80832
2
+ pytest_seleniumbase-4.33.14.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
3
+ pytest_seleniumbase-4.33.14.dist-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
4
+ pytest_seleniumbase-4.33.14.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.6.0)
2
+ Generator: setuptools (75.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,4 +0,0 @@
1
- pytest_seleniumbase-4.33.12.dist-info/METADATA,sha256=HH1QjBuvPhUQjG6aNH_mqLN4GclWFAvmFVwPWBhO6B8,81265
2
- pytest_seleniumbase-4.33.12.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
3
- pytest_seleniumbase-4.33.12.dist-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
4
- pytest_seleniumbase-4.33.12.dist-info/RECORD,,