I have a Selenium test, in which I need to click on a "cliclient://" link, and that link needs to open an application. Now, I need to create a new profile for each test, and I don't know how to bypass the "Launch Application" dialog that appears when clicking on the link:
Here's a snippet of the test that I've created:
profile = Selenium::WebDriver::Firefox::Profile.new
profile.secure_ssl = false
profile.assume_untrusted_certificate_issuer=true
profile["plugin.default.state"] = 2
profile["plugin.state.java"] = 2
profile["browser.download.folderList"] = 2
profile["browser.download.manager.alertOnEXEOpen"] = false
profile["browser.download.manager.closeWhenDone"] = true
profile["browser.download.manager.focusWhenStarting"] = false
profile["browser.download.manager.showWhenStarting"] = false
profile["browser.helperApps.alwaysAsk.force"] = false
profile["browser.helperApps.neverAsk.saveToDisk"] = 'application/x-msdownload,application/octet-stream, application/x-msdownload, application/exe, application/x-exe, application/dos-exe, vms/exe, application/x-winexe, application/msdos-windows, application/x-msdos-program'
profile["gfx.direct2d.disabled"] = true
profile["layers.acceleration.disabled"] = true
What is it in the profile that I need to set, to bypass the dialog, or to somehow click on OK when this dialog appears?
WebDriver driver = new FirefoxDriver(); This is the java implementation of launching a browser in Selenium. Here, 'WebDriver' is an interface and we are creating a reference variable 'driver' of type WebDriver, instantiated using 'FireFoxDriver' class.
Step 1: Navigate to the official Selenium website. Under third-party drivers, one will find all the drivers. Just click on the Mozilla GeckoDriver documentation as shown below. Now, it will navigate to the GeckoDriver downloads link, where one can download the suitable driver based on the OS as it is platform agnostic.
You can also try using SikuliX http://sikulix.com/ which is an automation software which uses images to recognise the GUI elements on which certain actions need to be performed
Hovever to use it with ruby you will most probably need to compile and run a java class via a system command and also you will need JDK installed on the machine where the automation will be performed
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With