How do I edit CodeMirror with Selenium in Python?

前端 未结 1 367
不知归路
不知归路 2021-01-14 05:38

I keep getting the error message below every time I try to insert text into CodeMirror on my webpage. Does anyone know how to successfully edit codemirror with selenium?

相关标签:
1条回答
  • 2021-01-14 05:52

    Figured out the answer to this one, I had to use actionChains instead of just regular old send_keys.

    codeMirror = self.driver.find_element(".CodeMirror")
    action_chains.click(codeMirror).perform()
    action_chains.send_keys("Hello World").perform()
    
    0 讨论(0)
提交回复
热议问题