【发布时间】:2016-01-08 19:29:28
【问题描述】:
我正在尝试在 here 的文本框中输入内容。右侧的方框显示“在此处粘贴您的文字”。
我想我的问题是如何找到我应该在 selenium 驱动程序中发送文本的框的项目,例如通过 id?
我尝试了类似的方法:
item = driver.find_element_by_css_selector("form#text_processor input[name=process_this]")
item.send_key("Test!")
但是当我这样做时,我会收到以下错误消息:
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"form#text_processor input[name=process_this]"}
感谢您对此提供的任何帮助。
【问题讨论】:
标签: python python-2.7 selenium selenium-webdriver