What I want to acheive is :
public class UploadVideo {
FlashSelenium flashapp = new FlashSelenium(null, null);
...
...
public void upload (){
flashapp.SetVariable(driver.findElement(By.id("flashInputButton")), "C:/testvid.mp4");
}
}
but this is giving error on .SetVariable which is
The method SetVariable(String, String) in the type FlashSelenium is not applicable for the arguments (WebElement, String)
Why I am doing this because normal .sendKeys() method is not working with this element. So I want to do it with the help of flash (flex)
Please let me know what I am doing wrong and how can I correct this?
Please look here for image and html code. I have attached image here, the green one.
https://stackoverflow.com/questions/17588703/error-in-browsing-file-via-webdriver
I have tried to make the inivible element visible using:
WebElement upload = driver.findElement(By.id("html5InputFile"));
((JavascriptExecutor) driver)
.executeScript(
"arguments[0].style.visibility = 'visible';",
upload);
upload.sendKeys("C:\\IE10test.mp4");
on running this gives "Element not visible or may not be interacted with" execption