操作富文本框

# 获取邮件正文编辑区域的iframe页面元素对象
iframe = self.driver.find_element_by_xpath('//iframe[contains(@id,"ueditor_0")]')


# 通过switch_to_frame()方法切换进富文本框中
self.driver.switch_to.frame(iframe)


# 从富文本框中切除,回到默认页面
self.driver.switch_to.default_content()
————————————————
版权声明:本文为CSDN博主「test_豆」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/doudou617/article/details/81318730

猜你喜欢

转载自www.cnblogs.com/hd-test/p/11737275.html