webdriver根据绝对路径标签id属性进行定位
#encoding = utf-8 import time from selenium import webdriver from selenium.webdriver.common.by import By driver = webdriver.Chrome() #打开百度首页 driver.get("https://passport.meituan.com/account/unitivelogin?") #根据绝对路径标签id属性进行定位 driver.find_element(by=By.XPATH,value='//*[@id="login-email"]').send_keys("134") #暂停6秒 time.sleep(6)
标签:webdriver,标签,driver,绝对路径,import,id From: https://www.cnblogs.com/dongtian/p/17498782.html