You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: help_docs/features_list.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@
24
24
* Can run tests with a customized browser user agent. (``--agent=USER_AGENT_STRING``)
25
25
* Can set a Chromium User Data Directory/Profile to load. (``--user-data-dir=DIR``)
26
26
* Can avoid detection by sites that try to block Selenium. (``--undetected``/``--uc``)
27
+
* Can integrate with [selenium-wire](https://github.com/wkeeling/selenium-wire) for inspecting browser requests. (``--wire``)
27
28
* Can load Chrome Extension ZIP files. (``--extension-zip=ZIP``)
28
29
* Can load Chrome Extension folders. (``--extension-dir=DIR``)
29
30
* Powerful [console scripts](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/console_scripts/ReadMe.md). (Type **``seleniumbase``** or **``sbase``** to use.)
The above format can let you use[selenium-wire](https://github.com/wkeeling/selenium-wire)to intercept & inspect requests and responses during SeleniumBase tests. Here's how the``selenium-wire`` integration may look:
258
+
The above format lets you customize[selenium-wire](https://github.com/wkeeling/selenium-wire)for intercepting and inspecting requests and responses during SeleniumBase tests. Here's how a``selenium-wire`` integration may look:
259
259
260
260
```python
261
261
from seleniumbase import BaseCase
@@ -277,6 +277,8 @@ class WireTestCase(BaseCase):
277
277
print(request.url)
278
278
```
279
279
280
+
(NOTE: The ``selenium-wire`` integration is now included with ``seleniumbase``: Add ``--wire`` as a ``pytest`` command-line option to activate. If you need both ``--wire`` with ``--undetected`` together, you'll still need to override ``get_new_driver()``.)
281
+
280
282
<aid="sb_sf_10"></a>
281
283
<h3><imgsrc="https://seleniumbase.github.io/img/logo3b.png"title="SeleniumBase"width="32" /> 10. Overriding the driver via "sb" fixture</h3>
282
284
@@ -297,7 +299,7 @@ def sb(request):
297
299
super(BaseClass, self).setUp()
298
300
299
301
deftearDown(self):
300
-
self.save_teardown_screenshot()
302
+
self.save_teardown_screenshot()# On failure or "--screenshot"
301
303
super(BaseClass, self).tearDown()
302
304
303
305
defbase_method(self):
@@ -352,7 +354,7 @@ def sb(request):
352
354
super(BaseClass, self).setUp()
353
355
354
356
deftearDown(self):
355
-
self.save_teardown_screenshot()
357
+
self.save_teardown_screenshot()# On failure or "--screenshot"
356
358
super(BaseClass, self).tearDown()
357
359
358
360
defbase_method(self):
@@ -390,6 +392,8 @@ class TestWire:
390
392
print(request.url)
391
393
```
392
394
395
+
(NOTE: The ``selenium-wire`` integration is now included with ``seleniumbase``: Add ``--wire`` as a ``pytest`` command-line option to activate. If you need both ``--wire`` with ``--undetected`` together, you'll still need to override ``get_new_driver()``.)
396
+
393
397
<aid="sb_sf_11"></a>
394
398
<h3><imgsrc="https://seleniumbase.github.io/img/logo3b.png"title="SeleniumBase"width="32" /> 11. BaseCase with Chinese translations</h3>
0 commit comments