Search code examples
pythonseleniumselenium-webdriverselenium-chromedrivercopy-paste

Can you tripleclick() a text to select a paragraph in python selenium?


Can you tripleclick() a text to select the paragraph in python selenium? Or doubleclick()? And then copy-paste it with ActionChains? Without having to ctrl+a.


Solution

  • from selenium.webdriver.common.action_chains import ActionChains
    actionChains = ActionChains(driver)
    
    actionChains.double_click("element variable name").perform()