enter code here
Brief : I am currently using selenium 2.0 to automate the testing of an UI.Everything was fine till yesterday till i came across pop ups.I am having to handle windows popups.
The problem : I am navigating to page using the following code =>
driver.get("http://xxx.xx.x.xxx:zzzz/yyyy/");
driver.findElement(By.name("username")).sendKeys("username");
driver.findElement(By.name("password")).sendKeys("password");
driver.findElement(By.className("rowClass")).submit();
driver.findElement(By.name("uploadfile")).click(); //this is the browse button
Now the problem arises when i click the browse button.It opens up another windows browse file window.What i need to do is to select a file by navigating to the given path and then select a particular file and i am not able to do the same currently.What could be the suggestion.Some one said it was not possible to do the same using selenium 2.0 and to use autoit instead.if someone knows how to do it please let me know else please suggest a better way to get it done.Thanks and regards.
PS :
//this is mentioned as the solution in http://seleniumhq.org/docs/03_webdriver.htmlbut did not work in my case
Alert alert = driver.switchTo().alert();