Performing a copy and paste with Selenium 2

后端 未结 8 1859
广开言路
广开言路 2020-11-30 05:05

Is there any way to perform a copy and paste using Selenium 2 and the Python bindings?

I\'ve highlighted the element I want to copy and then I perform the following

8条回答
  •  温柔的废话
    2020-11-30 05:32

    elem.send_keys(Keys.SHIFT, Keys.INSERT)
    

    It works FINE on macOS Catalina when you try to paste something.

提交回复
热议问题