找到图片上传的input标签:

selenium 图片上传方法。

直接使用send_keys()传值

browser.find_element_by_class_name("upload-pic").send_keys(r"C:\test.png")

 

完成!!

还有其他的方法,等以后不够用的时候在找吧

 

相关文章:

  • 2021-07-16
  • 2021-11-09
  • 2022-12-23
  • 2021-08-31
  • 2021-12-28
  • 2021-11-08
  • 2021-07-18
  • 2022-12-23
猜你喜欢
  • 2021-08-19
  • 2021-07-04
  • 2022-12-23
  • 2022-12-23
  • 2021-10-10
  • 2021-10-09
  • 2021-09-09
相关资源
相似解决方案