Weddriver processing rich text box
By running js, this method can deal with all kinds of difficult problems. The code is as follows:
/ / set the running method of js
Def input_content (self,content):
Js = "document.getElementById ('content_ifr'). ContentWindow.document.body.innerText =' admin'" / / contentWindow does not support the latest version of firefox well
Return self.dr.execute_script (js)
Js = "document.getElementsByClassName ('ke-edit-iframe') [0] .contentDocument.body.innerText =' admin'"
Js = "document.getElementById ('content_ifr'). ContentDocument.write (' admin');" / / write will continue to write after the text, and inner will directly overwrite the current text