Merge pull request #2554 from seleniumbase/update-recorder-and-sbase-print

Update the Recorder, "sbase print FILE.md", and dependencies
This commit is contained in:
Michael Mintz 2024-02-29 22:31:26 -05:00 committed by GitHub
commit e6a447738c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 22 additions and 14 deletions

View File

@ -12,15 +12,18 @@ class CDPTests(BaseCase):
lambda data: pprint(data)
)
def verify_success(self):
self.assert_text("OH YEAH, you passed!", "h1", timeout=6.25)
self.sleep(1)
def click_turnstile_and_verify(sb):
sb.driver.uc_switch_to_frame("iframe")
sb.driver.uc_click("span.mark")
sb.assert_element("img#captcha-success", timeout=3.33)
sb.highlight("img#captcha-success", loops=8)
def test_display_cdp_events(self):
if not (self.undetectable and self.uc_cdp_events):
self.get_new_driver(undetectable=True, uc_cdp_events=True)
self.driver.uc_open_with_tab("https://nowsecure.nl/#relax")
self.verify_success()
self.driver.uc_open("https://seleniumbase.io/apps/turnstile")
self.add_cdp_listener()
self.refresh()
self.click_turnstile_and_verify()
self.sleep(1)
self.refresh()
self.sleep(0.5)

View File

@ -117,8 +117,8 @@ driver.default_get(url) # Faster, but Selenium can be detected
👤 Here are some examples of using those special UC Mode methods: (Use `self.driver` for `BaseCase` formats. Use `sb.driver` for `SB()` formats):
```python
driver.uc_open_with_reconnect("https://nowsecure.nl/#relax", reconnect_time=5)
driver.uc_open_with_reconnect("https://nowsecure.nl/#relax", 5)
driver.uc_open_with_reconnect("https://top.gg/", reconnect_time=5)
driver.uc_open_with_reconnect("https://top.gg/", 5)
driver.reconnect(5)
driver.reconnect(timeout=5)
@ -127,8 +127,8 @@ driver.reconnect(timeout=5)
👤 You can also set the `reconnect_time` / `timeout` to `"breakpoint"` as a valid option. This allows the user to perform manual actions (until typing `c` and pressing ENTER to continue from the breakpoint):
```python
driver.uc_open_with_reconnect("https://nowsecure.nl/#relax", reconnect_time="breakpoint")
driver.uc_open_with_reconnect("https://nowsecure.nl/#relax", "breakpoint")
driver.uc_open_with_reconnect("https://top.gg/", reconnect_time="breakpoint")
driver.uc_open_with_reconnect("https://top.gg/", "breakpoint")
driver.reconnect(timeout="breakpoint")
driver.reconnect("breakpoint")

View File

@ -20,7 +20,7 @@ lxml==5.1.0
pyquery==2.0.0
readtime==3.0.0
mkdocs==1.5.3
mkdocs-material==9.5.11
mkdocs-material==9.5.12
mkdocs-exclude-search==0.6.6
mkdocs-simple-hooks==0.1.5
mkdocs-material-extensions==1.3.1

View File

@ -62,7 +62,7 @@ pyotp==2.9.0
markdown-it-py==2.2.0;python_version<"3.8"
markdown-it-py==3.0.0;python_version>="3.8"
mdurl==0.1.2
rich==13.7.0
rich==13.7.1
# --- Testing Requirements --- #
# ("pip install -r requirements.txt" also installs this, but "pip install -e ." won't.)

View File

@ -1,2 +1,2 @@
# seleniumbase package
__version__ = "4.24.2"
__version__ = "4.24.3"

View File

@ -609,6 +609,7 @@ def main():
all_code = all_code.replace("</b>", "**")
if "<code>`" not in all_code and "`<code>" not in all_code:
if "</code>`" not in all_code and "`</code>" not in all_code:
all_code = all_code.replace('<code translate="no">', "``")
all_code = all_code.replace("<code>", "``")
all_code = all_code.replace("</code>", "``")
# Display ALL <h> tags as an <h1> because the font size is fixed

Binary file not shown.

View File

@ -158,6 +158,8 @@ var getBestSelector = function(el) {
non_id_attributes.push('href');
non_id_attributes.push('label');
non_id_attributes.push('data-content');
non_id_attributes.push('data-tip');
non_id_attributes.push('data-for');
non_id_attributes.push('class');
non_id_attributes.push('for');
non_id_attributes.push('placeholder');

View File

@ -158,6 +158,8 @@ var getBestSelector = function(el) {
non_id_attributes.push('href');
non_id_attributes.push('label');
non_id_attributes.push('data-content');
non_id_attributes.push('data-tip');
non_id_attributes.push('data-for');
non_id_attributes.push('class');
non_id_attributes.push('for');
non_id_attributes.push('placeholder');

View File

@ -210,7 +210,7 @@ setup(
'markdown-it-py==2.2.0;python_version<"3.8"',
'markdown-it-py==3.0.0;python_version>="3.8"',
'mdurl==0.1.2',
'rich==13.7.0',
'rich==13.7.1',
],
extras_require={
# pip install -e .[allure]