Столкновение с проблемой при загрузке документа с помощью клавиш селена автоматизации для ввода файла - PullRequest
0 голосов
/ 16 апреля 2020
Facing an issue in upload document via selenium automation sendkeys to file input?

 Error :Invalid body input 400 status code bad request. Basically i am getting the location of the file input and then send filepath via sendkeys

Код селена: var location = BrowserInstance.Driver.WaitForElement (BrowserInstance.Driver, By.XPath ("// input [@type = \" file \ "]")) !; location.SendKeys (filePath);

    Html Code:
    <div class="modal-row">
          <div class="modal-row-column-max">
            <input
              type="file"
              #loadFile
              placeholder="Choose file"
              (change)="uploadLoadFile(loadFile.files)"
              style="display:none;"
              accept=".zip"
            />
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...