-
fixed, but i have a question def get_uc_sesh(): sb=get_uc_sesh() why it says that sb has no such a methods when i use it after, i want to use this session accross other py files? |
Beta Was this translation helpful? Give feedback.
Answered by
mdmintz
Apr 29, 2025
Replies: 1 comment 1 reply
-
from seleniumbase import SB
with SB(uc=True, test=True, ad_block=True) as sb:
url = "https://www.browserscan.net/bot-detection"
sb.activate_cdp_mode(url)
sb.sleep(1)
sb.cdp.flash("Test Results", duration=4)
sb.sleep(1)
sb.cdp.assert_element('strong:contains("Normal")')
sb.cdp.flash('strong:contains("Normal")', duration=4, pause=4) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
mdmintz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SB()
is a context manager. Must be used within awith
block:SeleniumBase/examples/cdp_mode/raw_browserscan.py