0

This is how my app works without using any automation:

enter image description here

I choose any file from the windows popup and then, the "NEXT" button is allowed to be clicked and also, i can delete the file chosen.


"Choose button" has this:

<a class="btn btn-primary btn-sm btn-upload">Choose file</a>

It's XPATH is:

//*[@id="div-add-file"]/a

I did this:

WebDriverWait wait8 = new WebDriverWait(driver,Duration.ofSeconds(10)); 
wait8.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//input[@type='file']"))).sendKeys("C:\\Users\\Steve\\Downloads\\01004185FCA003900517097.pdf");

But after running it the chosen file is shown in screen but it seems like the "action" of choosing the file did not work as expected:

enter image description here

It is like the file appeared but the action of choosing was not well performed. The NEXT button is not allowed to be clicked, it is like it did not choose anything at all

What am i doing wrong?

JustToKnow
  • 785
  • 6
  • 23

0 Answers0