Scenario: In my application there is file browser button. Clicking this browser the file selection windows opens. From there we select our required file and click on upload.
Problem: When we are doing this on Firefox and Chrome, there is no problem. But when we are doing this through IE11 that time the file browser button is being clicked by the script, but the file selection window is not poping up. I have checked the same manually on IE11, that time no problem is happening. But script opened is not responding on that specific button. For ex- Through script I launched the IE and paused the script. If I am trying to click the file browser option manually on the same browser now, it would not respond with the file selection dialog window. But at the same time if I open a new browser manually and try clicking that browser option manually, then it would work.
Web Code:
There is a <iframe>
object appears. Within this iframe
the whole html page loads and under some nested <div>
container this file browser option resides under <input id="UploadFile" class=*** type=*** ..>
like wise.
Selenium Code:
WebElement ImportDef = driver.findElement(By.id("UploadFile"));
Thread.sleep(3000);
ImportDef.click();