2021年11月16日

switch_to.active_element 获取焦点元素

摘要: https://blog.csdn.net/huilan_same/article/details/52338073 阅读全文

posted @ 2021-11-16 16:13 苦海舟 阅读(112) 评论(0) 推荐(0)

js 向iframe里的富文本框输入内容

摘要: https://exmail.qq.com document.querySelector('iframe#mainFrame').contentWindow.document.getElementsByClassName('QMEditorIfrmEditArea')[0].contentDocum 阅读全文

posted @ 2021-11-16 14:12 苦海舟 阅读(387) 评论(0) 推荐(0)

selenium 富文本框 send_keys 页面无内容

摘要: 在qq企业邮箱中定位编写邮件页面的正文输入框,并向其中输入内容,定位语句(已定位到body标签)与最后的send_keys都正常执行,无报错内容,但实际页面始终没有信息输入。 后来使用js语句完成输入操作:document.querySelector('body').innerText='123'; 阅读全文

posted @ 2021-11-16 14:01 苦海舟 阅读(165) 评论(0) 推荐(0)

selenium.common.exceptions.JavascriptException: Message: SyntaxError: unexpected token: identifier

摘要: 初始: string = ‘abc’ js = f"document.querySelector('body').innerText={string}"driver.execute_script(js) 执行报错: selenium.common.exceptions.JavascriptExcep 阅读全文

posted @ 2021-11-16 13:55 苦海舟 阅读(537) 评论(0) 推荐(0)

导航