我是硒的初学者。我想在搜索框中键入地址。但我找不到这个领域。字段HTML代码:
<input type="text" class="SearchField_SearchField__hDobT" placeholder="Address..." value="">
我正在尝试这样做:
element = driver.find_element_by_xpath("//input[@class='SearchField_SearchField__hDobT']")
或
element=driver.find_element_by_class_name("SearchField_SearchField__hDobT")
我得到了一个错误:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//input[@class='SearchField_SearchField__hDobT']"}
(Session info: chrome=80.0.3987.132)
或
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":".SearchField_SearchField__hDobT"}
(Session info: chrome=80.0.3987.132).
我也无法访问其他字段。我用JavaScript呈现HTML内容
我不知道是什么问题。请帮忙
目前没有回答
相关问题 更多 >
编程相关推荐