常用元素操作api之select下拉列表层级定位操作(五)
from selenium import webdriver
import time
#层级定位
driver=webdriver.Chrome()
driver.get('https://www.baidu.com')
driver.implicitly_wait(30)
driver.find_element_by_link_text('登录').click()
driver.find_element_by_id('TANGRAM__PSP_11__footerULoginBtn').click()
parent_element=driver.find_element_by_id('TANGRAM__PSP_11__userNameWrapper')
parent_element.find_element_by_id('TANGRAM__PSP_11__userName').send_keys('17633710286')