- Niyati
- Posts : 1
Join date : 2013-09-26
How to Upload File/Photo using “Upload Image Button” in Selenium Webdriver
Thu Sep 26, 2013 5:22 pm
- Code:
WebElement UploadImg = driver.findElement(By.xpath("//*[@id='file_upload_button']"));
UploadImg.click();
WebElement frame =driver.switchTo().activeElement();
frame.sendKeys("d:\5.jpg");
Re: How to Upload File/Photo using “Upload Image Button” in Selenium Webdriver
Mon Oct 07, 2013 2:01 am
You can not handle that pop-up in this way, but you can directly pass path of your file with sendkeys with upload button locator.
- nabhanya.varmaActive particpant
- Posts : 13
Join date : 2014-03-02
Re: How to Upload File/Photo using “Upload Image Button” in Selenium Webdriver
Tue Dec 16, 2014 12:30 am
First and the Easy way is simple case of just finding the element and typing the absolute path of the document into it using SendKeys. But that may not work for cases where customized button is used.
You need to go for AutoIt tool or Using Robots class
Check the below link for examples:
Upload Document/File
http://seleniumeasy.com/tags/upload
You need to go for AutoIt tool or Using Robots class
Check the below link for examples:
Upload Document/File
http://seleniumeasy.com/tags/upload
- Uploading a file through YUI Upload Component using Selenium Webdriver with Java
- File Upload using Webdriver
- Anybody any idea abt how to select upload file in webdriver
- Closing Upload Window in selenium Webdriver
- (Selenium Webdriver) Not able to click BROWSE button while uploading a file in GWT Framework
Permissions in this forum:
You cannot reply to topics in this forum