KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How do I disable the loading of flash objects when using Selenium Remote WebDriver. It will be helpful if I get a solution for the normal webdriver also. Since in most cases the Flash object is loaded by a JavaScript I have tried disabling the javascript on the webdriver and remote webdriver both, but it does not work. I tried to to disable the JavaScript by: WebDriver driver = new FirefoxDriver(); ((DesiredCapabilities) driver.getCapabilities()).setJavascriptEnabled(false); I also tried: DesiredCapabilities caps = new DesiredCapabilities(); caps.setJavascriptEnabled(false); WebDriver driver = new FireFoxDriver(caps); For Remote WebDriver i tried: final DesiredCapabilities firefoxCapability = DesiredCapabilities.firefox(); firefoxCapability.setJavascriptEnabled(false); new RemoteWebDriver(new URL("http://" + windowsIP + ":4444/wd/hub"), firefoxCapability); After execution of the above statement the remote server displays Executing: [new session: <platform=ANY, javascriptEnabled=false, browserName=firefox, version=>] at URL:/session> but still all the Javascript is executing on the pages the driver loads and the Flash is also loading. Please help me : 1. how can stop the flash from loading. 2. need it on remote driver as I need to test the pages on IE, Firefox, Chrome. Hence loading the forefox profile will not work Thank you for the help.
Tags (comma-separated)
Save Edits
Cancel