Overlay or Frame我正在尝试使用Python代码,以便在发货时使用特定字段中的跟踪号更新我的DISCOG
当我检查该字段框时,这是代码(也显示在我的附件中)
input type="text" class="full_width push_down_mini" style="margin-right:0;" placeholder="Tracking number (optional)" data-reactid=".0.$=1$react-modal-overlay.$react-modal.3.0.3"
我很擅长使用driver.find_element_by_ID
{Name
导航。但是无法找到使用什么来定位这个字段框元素,这样我就可以使用search.send_keys
。我试过{class
但没有运气错误返回,无法找到元素
具有多个类名的
input
字段,即full_width
和push_down_mini
。所以我认为css选择器是最好的方法在这种情况下,您不能使用
.find_element_by_class_name
,因为这只是一个类名#更新
尝试下面的代码,使用
.find_element_by_css_selector
:或使用
.find_element_by_xpath
:相关问题 更多 >
编程相关推荐