pytest-seleniumbase 4.33.12__tar.gz → 4.33.13__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.

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.13
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.13
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
 
@@ -63,21 +63,76 @@
63
63
 
64
64
  📚 Learn from [**over 200 examples** in the **SeleniumBase/examples/** folder](https://github.com/seleniumbase/SeleniumBase/tree/master/examples).
65
65
 
66
- 👤 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>.
66
+ 🐙 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.
67
67
 
68
- 🐙 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>.
68
+ ℹ️ 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).
69
69
 
70
- ℹ️ 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).
70
+ --------
71
71
 
72
- <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>
72
+ <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>
73
73
 
74
- ```bash
75
- pytest my_first_test.py
74
+ ```python
75
+ from seleniumbase import SB
76
+
77
+ with SB(test=True) as sb:
78
+ sb.open("https://google.com/ncr")
79
+ sb.type('[title="Search"]', "SeleniumBase GitHub page\n")
80
+ sb.click('[href*="github.com/seleniumbase/"]')
81
+ sb.save_screenshot_to_logs() # ./latest_logs/
82
+ print(sb.get_page_title())
76
83
  ```
77
84
 
78
- <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>
85
+ > `python raw_google.py`
86
+
87
+ <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>
88
+
89
+ --------
90
+
91
+ <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>
79
92
 
80
- > ``pytest`` uses ``--chrome`` by default unless set differently.
93
+ ```python
94
+ from seleniumbase import SB
95
+
96
+ with SB(uc=True, test=True, locale_code="en") as sb:
97
+ url = "https://gitlab.com/users/sign_in"
98
+ sb.activate_cdp_mode(url)
99
+ sb.uc_gui_click_captcha()
100
+ sb.sleep(2)
101
+ ```
102
+
103
+ <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">
104
+
105
+ --------
106
+
107
+ <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>
108
+
109
+ ```python
110
+ from seleniumbase import BaseCase
111
+ BaseCase.main(__name__, __file__) # Call pytest
112
+
113
+ class MyTestClass(BaseCase):
114
+ def test_swag_labs(self):
115
+ self.open("https://www.saucedemo.com")
116
+ self.type("#user-name", "standard_user")
117
+ self.type("#password", "secret_sauce\n")
118
+ self.assert_element("div.inventory_list")
119
+ self.click('button[name*="backpack"]')
120
+ self.click("#shopping_cart_container a")
121
+ self.assert_text("Backpack", "div.cart_item")
122
+ self.click("button#checkout")
123
+ self.type("input#first-name", "SeleniumBase")
124
+ self.type("input#last-name", "Automation")
125
+ self.type("input#postal-code", "77123")
126
+ self.click("input#continue")
127
+ self.click("button#finish")
128
+ self.assert_text("Thank you for your order!")
129
+ ```
130
+
131
+ > `pytest test_get_swag.py`
132
+
133
+ <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>
134
+
135
+ > (The default browser is ``--chrome`` if not set.)
81
136
 
82
137
  --------
83
138
 
@@ -87,7 +142,7 @@ pytest my_first_test.py
87
142
  pytest test_coffee_cart.py --demo
88
143
  ```
89
144
 
90
- <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>
145
+ <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>
91
146
 
92
147
  > <p>(<code translate="no">--demo</code> mode slows down tests and highlights actions)</p>
93
148
 
@@ -101,7 +156,7 @@ pytest test_coffee_cart.py --demo
101
156
  pytest test_demo_site.py
102
157
  ```
103
158
 
104
- <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>
159
+ <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>
105
160
 
106
161
  > Easy to type, click, select, toggle, drag & drop, and more.
107
162
 
@@ -171,7 +226,7 @@ With raw Selenium, that requires more code:<br />
171
226
 
172
227
  <p>📚 <b>Learn about different ways of writing tests:</b></p>
173
228
 
174
- <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>
229
+ <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>
175
230
 
176
231
  ```python
177
232
  from seleniumbase import BaseCase
@@ -190,22 +245,7 @@ class TestSimpleLogin(BaseCase):
190
245
  self.assert_text("signed out", "#top_message")
191
246
  ```
192
247
 
193
- <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>
194
-
195
- ```python
196
- def test_sb_fixture_with_no_class(sb):
197
- sb.open("seleniumbase.io/simple/login")
198
- sb.type("#username", "demo_user")
199
- sb.type("#password", "secret_pass")
200
- sb.click('a:contains("Sign in")')
201
- sb.assert_exact_text("Welcome!", "h1")
202
- sb.assert_element("img#image1")
203
- sb.highlight("#image1")
204
- sb.click_link("Sign out")
205
- sb.assert_text("signed out", "#top_message")
206
- ```
207
-
208
- <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>
248
+ <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>
209
249
 
210
250
  ```python
211
251
  from seleniumbase import SB
@@ -222,24 +262,7 @@ with SB() as sb:
222
262
  sb.assert_text("signed out", "#top_message")
223
263
  ```
224
264
 
225
- <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>
226
-
227
- ```python
228
- from seleniumbase import DriverContext
229
-
230
- with DriverContext() as driver:
231
- driver.open("seleniumbase.io/simple/login")
232
- driver.type("#username", "demo_user")
233
- driver.type("#password", "secret_pass")
234
- driver.click('a:contains("Sign in")')
235
- driver.assert_exact_text("Welcome!", "h1")
236
- driver.assert_element("img#image1")
237
- driver.highlight("#image1")
238
- driver.click_link("Sign out")
239
- driver.assert_text("signed out", "#top_message")
240
- ```
241
-
242
- <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>
265
+ <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>
243
266
 
244
267
  ```python
245
268
  from seleniumbase import Driver
@@ -259,23 +282,6 @@ finally:
259
282
  driver.quit()
260
283
  ```
261
284
 
262
- <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>
263
-
264
- ```gherkin
265
- Feature: SeleniumBase scenarios for the Simple App
266
-
267
- Scenario: Verify the Simple App (Login / Logout)
268
- Given Open "seleniumbase.io/simple/login"
269
- And Type "demo_user" into "#username"
270
- And Type "secret_pass" into "#password"
271
- And Click 'a:contains("Sign in")'
272
- And Assert exact text "Welcome!" in "h1"
273
- And Assert element "img#image1"
274
- And Highlight "#image1"
275
- And Click link "Sign out"
276
- And Assert text "signed out" in "#top_message"
277
- ```
278
-
279
285
  --------
280
286
 
281
287
  <a id="python_installation"></a>
@@ -374,20 +380,21 @@ pip install -e .
374
380
  <summary> ▶️ Here's sample output from a chromedriver download. (<b>click to expand</b>)</summary>
375
381
 
376
382
  ```bash
377
- *** chromedriver to download = 121.0.6167.85 (Latest Stable)
383
+ *** chromedriver to download = 131.0.6778.108 (Latest Stable)
378
384
 
379
385
  Downloading chromedriver-mac-arm64.zip from:
380
- https://storage.googleapis.com/chrome-for-testing-public/121.0.6167.85/mac-arm64/chromedriver-mac-arm64.zip ...
386
+ https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.108/mac-arm64/chromedriver-mac-arm64.zip ...
381
387
  Download Complete!
382
388
 
383
389
  Extracting ['chromedriver'] from chromedriver-mac-arm64.zip ...
384
390
  Unzip Complete!
385
391
 
386
392
  The file [chromedriver] was saved to:
387
- /Users/michael/github/SeleniumBase/seleniumbase/drivers/chromedriver
393
+ ~/github/SeleniumBase/seleniumbase/drivers/
394
+ chromedriver
388
395
 
389
- Making [chromedriver 121.0.6167.85] executable ...
390
- [chromedriver 121.0.6167.85] is now ready for use!
396
+ Making [chromedriver 131.0.6778.108] executable ...
397
+ [chromedriver 131.0.6778.108] is now ready for use!
391
398
  ```
392
399
 
393
400
  </details>
@@ -405,9 +412,9 @@ cd examples/
405
412
  pytest my_first_test.py
406
413
  ```
407
414
 
408
- <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>
415
+ <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>
409
416
 
410
- <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>
417
+ <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>
411
418
 
412
419
  ```python
413
420
  from seleniumbase import BaseCase
@@ -823,7 +830,7 @@ You can run it from the ``examples/`` folder like this:
823
830
  pytest test_fail.py
824
831
  ```
825
832
 
826
- 🔵 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.
833
+ 🔵 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.
827
834
 
828
835
  --------
829
836
 
@@ -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.13
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.13
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 @@
1
+ seleniumbase>=4.33.13
@@ -68,7 +68,7 @@ if sys.argv[-1] == "publish":
68
68
 
69
69
  setup(
70
70
  name='pytest-seleniumbase',
71
- version='4.33.12',
71
+ version='4.33.13',
72
72
  description='A complete web automation framework for end-to-end testing.',
73
73
  long_description=long_description,
74
74
  long_description_content_type='text/markdown',
@@ -122,7 +122,7 @@ setup(
122
122
  ],
123
123
  python_requires=">=3.8",
124
124
  install_requires=[
125
- 'seleniumbase>=4.33.12',
125
+ 'seleniumbase>=4.33.13',
126
126
  ],
127
127
  packages=[
128
128
  ],
@@ -1 +0,0 @@
1
- seleniumbase>=4.33.12