Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98221

Does anybody know how to launch the print dialog from chrome by selenium+python

$
0
0

I have a question about how to launch the print dialog from chrome browser. I know the shortcut key to open this is ctrl+p, but I don't know how to describe it in selenium. Does anyone know this? Thanks a lot!

I tried the following code, but it doesn't work on my Chrome browser.

    actions = ActionChains(driver)
    actions.move_to_element(driver.find_element_by_tag_name('body'))
    actions.key_down(Keys.CONTROL).send_keys('T').key_up(Keys.CONTROL).perform()

Viewing all articles
Browse latest Browse all 98221

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>