Closed SanjaySRocks closed 2 months ago
@SanjaySRocks, thank you for creating this issue. We will troubleshoot it as soon as we can.
Triage this issue by using labels.
If information is missing, add a helpful comment and then I-issue-template
label.
If the issue is a question, add the I-question
label.
If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted
label.
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable G-*
label, and it will provide the correct link and auto-close the
issue.
After troubleshooting the issue, please add the R-awaiting answer
label.
Thank you!
Please try using the print command available for all drivers.
Working code example:
options = webdriver.ChromeOptions()
driver = webdriver.Remote(
command_executor='http://localhost:4444/wd/hub',
options=options
)
print_options = PrintOptions()
driver.get('https://google.com')
driver.print_page(print_options=print_options)
driver.quit()
"execute_cdp_cmd " - This command is only available in the Chromium driver. Please refer to the following example if you require to use CDP commands
options = webdriver.ChromeOptions()
driver = webdriver.Remote(
command_executor='http://localhost:4444/wd/hub',
options=options
)
devtools, connection = driver.start_devtools()
connection.execute(devtools.page.print_to_pdf())
This issue has been automatically locked since there has not been any recent activity since it was closed. Please open a new issue for related bugs.
What happened?
When I execute python code for printing html to pdf it throws an error
error:
code
It should run perfectly as it runs (successfully) in selenium locally without using grid. However it throws an error when using selenium grid remotely.
How can we reproduce the issue?
Relevant log output
Operating System
Ubuntu 22.04.3 LTS
Selenium version
Python (Version: 4.8.3)
What are the browser(s) and version(s) where you see this issue?
Google Chrome 127.0.6533.72
What are the browser driver(s) and version(s) where you see this issue?
ChromeDriver 127.0.6533.72
Are you using Selenium Grid?
Yes - 4.23.0 (revision 77010cd)