I have 4 images in a folder and need to upload all of them together into my application. I have done single file upload through selenium using sendKeys, but the multi file upload is a challenge!
See Question&Answers more detail:osI have 4 images in a folder and need to upload all of them together into my application. I have done single file upload through selenium using sendKeys, but the multi file upload is a challenge!
See Question&Answers more detail:osWebElement uploadElement = driver.findElement(By.xpath(" "));
//Single file upload
uploadElement.sendKeys("C:\foldername\abcd.png");
//Multi file upload - simultaneous
uploadElement.sendKeys("C:/foldername/firstImg.png
C:/foldername/secondImg.png
C:/foldername/thirdImg.png");
Note :
needs to be preceeded with space