driver.get('http://www.baidu.com')
#绝对定位,这种方法少用
driver.find_element_by_xpath("/html/body/div[1]/div[1]/div/div[1]/div/form/span[1]/input").send_keys('pyhon')
#相对定位
driver.find_element_by_xpath('//input[@]').send_keys('python')

相关文章:

  • 2021-12-03
  • 2021-10-11
  • 2021-09-19
  • 2021-10-16
  • 2022-01-29
  • 2022-03-02
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-19
  • 2021-07-01
相关资源
相似解决方案