Home > other >  Python send_keys selenium - upload file is not successful
Python send_keys selenium - upload file is not successful

Time:09-26

Today meet a problem, consult everybody warrior:

Objective: is to use python + selenium on the page to upload a file,
Description: upload a file box is input control, check the book and baidu, said can use send_keys to implement;
In pyCharm execute the script, no error, but there is no import file success,
Researchers help to check the log, saying: look only a path string in that box, file on no,

Code is as follows:








CodePudding user response:

Problem has been solved, it is the frame of the input file location is not correct, should choose the type is a file type: type="file" in the box: id="upload"
  • Related