-
|
I can't get pdf to download to the corresponding download folder after setting external_pdf=True I then tried the format I had used with UC mode: TypeError: 'Chrome' object does not support the context manager protocol |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
You might be mixing up the Syntax Formats: This script does what you're looking for: from seleniumbase import SB
with SB(uc=True, external_pdf=True) as sb:
url = "https://dm.epiq11.com/case/pinstripes/dockets"
sb.activate_cdp_mode(url)
sb.sleep(5)
sb.wait_for_any_of_elements_present('[class="document-card document-card-docket"]', timeout=30)
selector='div.main-content--no-padding > div:nth-child(9) div[class="document-card-docket__document-icon document-card-docket__document-icon--mobile"] div a[target="_blank'
sb.click(selector)
sb.sleep(5)If you want to download files, that takes place outside the browser, so you can't use Pure CDP Mode for that, which is for actions that take place 100% inside the website. However, you can use UC + CDP Mode for that (downloading files). |
Beta Was this translation helpful? Give feedback.
-
|
Successfully downloaded all 300 PDF dockets flawlessly..Thanks again |
Beta Was this translation helpful? Give feedback.
You might be mixing up the Syntax Formats:
This script does what you're looking for:
If you want to download files, that takes place outside the browser, so you can't use Pure CDP Mode for that, which is f…