找不到xpath以及如何向iframe添加值

2024-06-09 14:55:25 发布

您现在位置:Python中文网/ 问答频道 /正文

我在获取iframe和在上面写东西方面遇到了问题。 附件是iframe的照片

到目前为止,我试过:

driver.switchTo().frame(__tcfapiLocator)--> this is the id of the frame

driver.quit()


description = '/html/body/iframe'
driver.find_elements_by_xpath(description).send_keys("Hello")

我还发现了这样一个路径“/*[@id=“description_ifr”]”enter image description here

它还具有存储文本的id <;text区域 id="description" class="" placeholder="

因此,如果我写一些manul的东西,价值就在“asasaas”

体位

Tags: oftheid附件ishtmldriverdescription