如何将关键帧发送到iframe中的可编辑实体
第页:
<iframe id="description_ifr" frameborder="0" allowtransparency="true" title="Rich Text Area..." src="javascript:""" style="width: 100%; height: 200px; display: block;"><html><head>...</head><body id="tinymce" class="mce-content-body " data-id="description" contenteditable="true" spellcheck="false" style="min-height: 184px;"><br data-mce-bogus="1"></body></html></iframe>
我试过的代码:
description = browser.find_element_by_id('tinymce')
description.click()
description.send_keys("Test")
错误:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[id="tinymce"]"}
在发送文本之前,应切换到iframe
试试看
相关问题 更多 >
编程相关推荐