I am new to Selenium Webdriver, i want to open the file upload window after clicking on Browse button but i am not able to open it using webdriver.
Here is my code :
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
public class Login_Page {
static WebDriver driver;
public static void main(String args[])
{
driver = new FirefoxDriver();
driver.manage().window().maximize();
WebDriverWait wait = new WebDriverWait(driver, 40);
WebDriverWait wait = new WebDriverWait(driver, 40);
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.get("http://www.toolsqa.com/automation-practice-form");
driver.findElement(By.id("photo")).click();
}
}
I am not able to see any file upload window.
I am using Firefox 14.0.1 and selenium-server-standalone-2.24.1.jar
Please let me know how can i do it? Thanks