Upload file with Selenium in Python

前端 未结 6 1067
我在风中等你
我在风中等你 2021-01-14 19:14

Is it possible to upload file attachment with selenium in Python script?

6条回答
  •  迷失自我
    2021-01-14 19:45

    It can be done via:

    element = driver.find_element_by_name("file")
    element.send_keys("/home/pavel/Desktop/949IH3GNHAo.jpg")
    

提交回复
热议问题