I have a HTML code with button name Upload & id as 'btn-import-questions'
<button class="btn btn-success btn-sm col-lg-11" id="btn-import-questions" data-ts-file-selector="questions-import-init"> Upload <i class="fa fa-upload"></i></button>
I tried a selenium code like this ,
driver.findElement(By.id("btn-import-questions")).sendkeys("C:/path/to/file.xlsx");
But since upload is a button not an input-type, the above code is not working
Aucun commentaire:
Enregistrer un commentaire