Skip to content

Commit ab0f597

Browse files
authored
Merge pull request #1689 from seleniumbase/cdp-events-in-uc-mode-2
Add option for capturing CDP events in UC Mode
2 parents 0862fbc + a8f4777 commit ab0f597

34 files changed

+178
-65
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,7 @@ pytest my_first_test.py --pdb
548548
--enable-ws # (Enable Web Security on Chromium-based browsers.)
549549
--enable-sync # (Enable "Chrome Sync" on websites.)
550550
--uc | --undetected # (Use undetected-chromedriver to evade bot-detection.)
551+
--uc-cdp-events # (Capture CDP events when running in "--undetected" mode.)
551552
--remote-debug # (Sync to Chrome Remote Debugger chrome://inspect/#devices)
552553
--final-debug # (Enter Debug Mode after each test ends. Don't use with CI!)
553554
--dashboard # (Enable the SeleniumBase Dashboard. Saved at: dashboard.html)

examples/boilerplates/base_test_case.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
"""
2-
You can use this as a boilerplate for your test framework.
3-
Define your customized library methods in a master class like this.
4-
Then have all your test classes inherit it.
5-
BaseTestCase will inherit SeleniumBase methods from BaseCase.
6-
"""
7-
1+
"""Use this as a boilerplate for your test framework.
2+
Define customized library methods in a class like this.
3+
Then have your test classes inherit it.
4+
BaseTestCase inherits SeleniumBase methods from BaseCase."""
85
from seleniumbase import BaseCase
96

107

examples/boilerplates/classic_obj_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Classic Page Object Model with BaseCase inheritance """
1+
"""Classic Page Object Model with BaseCase inheritance."""
22
from seleniumbase import BaseCase
33

44

examples/boilerplates/page_objects.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
"""
2-
Example of using the Page Object Pattern for tests, using CSS selectors.
3-
Helps make your code more Readable, Maintainable, and Reusable.
4-
Import a file like this at the top of your test files.
5-
"""
1+
"""Example of using the Page Object Pattern in tests.
2+
Makes code more Readable, Maintainable, and Reusable.
3+
Import files like this at the top of your test files."""
64

75

86
class Page(object):

examples/boilerplates/samples/file_parsing/parse_files.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
"""Example of parsing data from files."""
22
from seleniumbase import BaseCase
3+
BaseCase.main(__name__, __file__)
34

45

56
class ParseTestCase(BaseCase):
6-
def setUp(self):
7-
super().setUp()
8-
97
def get_login_credentials(self, user_type):
108
# Example of parsing data from a file (Method 1)
119
with open("qa_login_example.txt") as f:

examples/boilerplates/samples/google_objects.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" google.com page objects """
1+
"""google.com page objects"""
22

33

44
class HomePage(object):

examples/boilerplates/samples/sb_swag_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Classic Page Object Model with the "sb" fixture """
1+
"""Classic Page Object Model with the "sb" fixture."""
22

33

44
class LoginPage:

examples/boilerplates/samples/swag_labs_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
""" Classic Page Object Model with BaseCase inheritance """
2-
1+
"""Classic Page Object Model with BaseCase inheritance."""
32
from seleniumbase import BaseCase
43

54

examples/boilerplates/samples/test_page_objects.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" An example test using the Classic Page Object Model """
1+
"""An example using the Classic Page Object Model."""
22
from seleniumbase import BaseCase
33

44

examples/boilerplates/sb_fixture_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Classic Page Object Model with the "sb" fixture """
1+
"""Classic Page Object Model with the "sb" fixture."""
22

33

44
class DataPage:

0 commit comments

Comments
 (0)