通过id class xpath 找元素

#通过id定位放大镜按钮,点击
search_button = driver.find_element_by_id("com.android.settings:id/search")---------------》图中1
search_button.click()
sleep(20)
#通过class定位输入框,写hello
driver.find_element_by_class_name("android.widget.EditText").send_keys("hello")-------------------》图中2
#通过xpath定位属性,
driver.find_element_by_xpath("//*[@text='显示']").click()-------------------》图中3

原文地址:https://www.cnblogs.com/fanqiusha1988/p/13371319.html