-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Trying use requests on Selenium base #3767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
There's an example of using |
@mdmintz I saw this example, but it's using BaseCase... It'll work with SB? |
Also try this: from seleniumbase import SB
from rich.pretty import pprint
def click_turnstile_and_verify(sb):
sb.uc_gui_handle_captcha()
sb.assert_element("img#captcha-success", timeout=3)
sb.highlight("img#captcha-success", loops=8)
with SB(uc_cdp_events=True) as sb:
url = "seleniumbase.io/apps/turnstile"
sb.uc_open_with_reconnect(url, 2)
sb.driver.add_cdp_listener(
"Network.requestWillBeSentExtraInfo",
lambda data: pprint(data)
)
click_turnstile_and_verify(sb)
sb.sleep(1)
sb.refresh()
sb.sleep(1) |
Here's the example for it: |
I'll try all these alternatives... So far none of them have worked. I have the code in selenium, if I send the code, can you help me to convert the code? |
Did you try all the examples listed below? If they didn't work, what output did you see? |
the request that I need to capture for a list is not working, I will keep trying, if I don't succeed on Monday I will come back here! Thank you very much for your support! And yes, I tried the alternatives, I will try again |
Hey, can I use
driver.add_cdp_listener
with SB?The text was updated successfully, but these errors were encountered: