Disable Chrome 'Multiple Automatic Download' Prompt with Ruby Watir ChromeDriver-DesiredCapabilites [duplicate] - ruby

I developed a crawler with ruby watir-webdriver that downloads some files from a page. My problem is that when I click to download the second file, Chrome opens a bar in the top asking for confirmation that I am downloading multiple files from this website.
Once this is used by webdriver, I cannot confirm the download. Is there anyway to avoid this confirmation? I am thinking if is there any configuration to avoid it or if is there an extension to do this or even if I can click on the confirmation with webdriver.
thanks

I'm using Chrome 49 and none of the other solutions worked for me.
After some research I found a working solution:
ChromeDriver createChromeDriverWithDownloadFolder(String folder) {
Map<String, Object> chromePrefs = new HashMap<String, Object>();
chromePrefs.put("profile.default_content_settings.popups", 0);
chromePrefs.put("download.default_directory", folder);
chromePrefs.put("profile.content_settings.exceptions.automatic_downloads.*.setting", 1 );
chromePrefs.put("download.prompt_for_download", false);
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("prefs", chromePrefs);
DesiredCapabilities cap = DesiredCapabilities.chrome();
cap.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
cap.setCapability(ChromeOptions.CAPABILITY, options);
return new ChromeDriver(cap);
}
It seems as if these settings are constantly changing. Therefore, here's how I found the right solution for my setup:
Open Chrome and go to chrome://version/ to find the path of your profile
In Default/Preferences is a json file called Preferences. Open it and search for automatic_downloads.
In my case the interesting part of the file looked like this:
..."profile": {
"avatar_bubble_tutorial_shown": 1,
"avatar_index": 0,
"content_settings": {
"clear_on_exit_migrated": true,
"exceptions": {
"app_banner": {},
"auto_select_certificate": {},
"automatic_downloads": {
"[.]localhost:63342,": {
"setting": 1
},...
From that I could derive that the right setting would be chromePrefs.put("profile.content_settings.exceptions.automatic_downloads.*.setting", 1 );

As of Chrome 56.0.2924.87, February 17, 2017, the only preference you need to set (however you set them for your webdriver) is:
'profile.default_content_setting_values.automatic_downloads': 1
Giving an updated answer because most answers here use outdated preferences or show other preferences that are unnecessary.

for new chrome (version 46 or newer) this options was changed
now your hash must looks like this:
prefs = {
'profile' => {
'default_content_settings' => {'multiple-automatic-downloads' => 1}, #for chrome version olde ~42
'default_content_setting_values' => {'automatic_downloads' => 1}, #for chrome newer 46
}
}
browser = Watir::Browser.new :chrome, options: {prefs: prefs, args: ['--test-type', '--disable-infobars'}

Here is the solution for Java - Selenium implementation
We faced hard time fixing this, as we wanted to add automation test for functionality which downloads set of PDFs on a single download link.
Map<String, Object> prefs = new HashMap<String, Object>();
//To Turns off multiple download warning
prefs.put("profile.default_content_settings.popups", 0);
prefs.put( "profile.content_settings.pattern_pairs.*.multiple-automatic-downloads", 1 );
//Turns off download prompt
prefs.put("download.prompt_for_download", false);
ChromeOptions options = new ChromeOptions();
options.setExperimentalOptions("prefs", prefs);
driver = new ChromeDriver(options);
Hope this help to someone.

It seems that the solution is different for older and newer chromedriver versions and that is adding to the confusion.
chromedriver
profile = Selenium::WebDriver::Chrome::Profile.new
profile['download.prompt_for_download'] = false
profile['download.default_directory'] = download_directory
b = Watir::Browser.new :chrome, :profile => profile
chromedriver2
prefs = {
'profile' => {
'default_content_settings' => {'multiple-automatic-downloads' => 1},
}
}
b = Watir::Browser.new :chrome, :prefs => prefs
Today most people are probably using chromedriver2 version and that is a solution that should work fine. It worked ok in my watir scripts as I am not getting the message: "This site is attempting to download multiple files. Do you want to allow this?" anymore.

Java solution:
cap = DesiredCapabilities.chrome();
ChromeOptions options = new ChromeOptions();
Map<String, Object> prefs = new HashMap<>();
Map<String, Object> content_setting = new HashMap <>();
content_setting.put("multiple-automatic-downloads",1);
prefs.put("download.prompt_for_download", "false");
prefs.put("profile.default_content_settings", content_setting);
options.setExperimentalOption("prefs", prefs);
cap.setCapability(ChromeOptions.CAPABILITY, options);

this is what worked for me:
HashMap<String, Object> chromePrefs = new HashMap<String, Object>();
chromePrefs.put("profile.default_content_settings.popups", 0);
chromePrefs.put("profile.default_content_setting_values.automatic_downloads", 1);
chromePrefs.put("download.prompt_for_download", false);
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("prefs", chromePrefs);
DesiredCapabilities cap = DesiredCapabilities.chrome();
cap.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
cap.setCapability(ChromeOptions.CAPABILITY, options);

This bug/enhancement has been raised in the chromedriver page at the below URL:
http://code.google.com/p/chromedriver/issues/detail?id=130
Bug/Enhancement Status: Yet to be resolved.

I have tried to do it on page load client-side using markups.
<META HTTP-EQUIV="Content-Disposition" CONTENT="inline" />
It seems to work (it is working at this moment, in overriding).
But time will tell (might not have effect on future CHROME's, you know what I mean).
There are a list of available header fields published on a couple of sites which I find extremely helpful. Hope it will help you, as well.
https://www.w3.org/Protocols/HTTP/Issues/content-disposition.txt
https://www.iana.org/assignments/cont-disp/cont-disp.xhtml#cont-disp-2

Related

How to take full page screenshots with Watir and geckodriver + Firefox?

I upgraded my Watir / Firefox automation stack to the latest version, and added geckodriver with it. I was surprised to see that now screenshots are of the viewport only by default.
require 'watir'
require 'mini_magick'
b = Watir::Browser.new :firefox
b.goto "https://daringfireball.net"
base = b.screenshot.base64
blob = Base64.decode64(base)
image = MiniMagick::Image.read(blob)
image.height
=> 1760 # macOS 'Retina' resolution doubling
b.execute_script "return window.innerHeight"
=> 880 # 880 * 2 = 1760
b.execute_script "return document.documentElement.scrollHeight"
=> 34692
geckodriver does not have any API for full page screenshots, though reintroducing this feature is planned (on an infinite timescale).
How can I take screenshots of the full page with Watir driving Firefox without rolling back my environment?
Using Watir's .execute_script, it is possible to repeatedly take screenshots of the viewport while moving the scroll position. It is then possible to stitch images together using MiniMagick.
I developed the watir-screenshot-stitch gem to encapsulate my best approach to solving this problem, though it comes with caveats, which you can read about there. It is also memory intensive and can be slow.
This is not a true full-page screenshot solution, and I would gladly accept any alternative approaches that improve on this.
I solved the problem in C#. But the solution I guess can be rewritten on any language. I used a JavaScript library called HTML2Canvas to generate the full page screenshots. Here is the C# code:
[Test]
public void TakingHTML2CanvasFullPageScreenshot()
{
using (var driver = new ChromeDriver())
{
driver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(5);
driver.Navigate().GoToUrl(#"https://automatetheplanet.com");
IJavaScriptExecutor js = driver;
var html2canvasJs = File.ReadAllText($"{GetAssemblyDirectory()}html2canvas.js");
js.ExecuteScript(html2canvasJs);
string generateScreenshotJS = #"function genScreenshot () {
var canvasImgContentDecoded;
html2canvas(document.body, {
onrendered: function (canvas) {
window.canvasImgContentDecoded = canvas.toDataURL(""image/png"");
}});
}
genScreenshot();";
js.ExecuteScript(generateScreenshotJS);
var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
wait.IgnoreExceptionTypes(typeof(InvalidOperationException));
wait.Until(
wd =>
{
string response = (string)js.ExecuteScript
("return (typeof canvasImgContentDecoded === 'undefined' || canvasImgContentDecoded === null)");
if (string.IsNullOrEmpty(response))
{
return false;
}
return bool.Parse(response);
});
wait.Until(wd => !string.IsNullOrEmpty((string)js.ExecuteScript("return canvasImgContentDecoded;")));
var pngContent = (string)js.ExecuteScript("return canvasImgContentDecoded;");
pngContent = pngContent.Replace("data:image/png;base64,", string.Empty);
byte[] data = Convert.FromBase64String(pngContent);
var tempFilePath = Path.GetTempFileName().Replace(".tmp", ".png");
Image image;
using (var ms = new MemoryStream(data))
{
image = Image.FromStream(ms);
}
image.Save(tempFilePath, ImageFormat.Png);
}
}
You can find more examples and explanations in the article.
It is now possible to do this in Firefox, employing a geckodriver feature. As far as I know, this feature is not baked into Selenium / probably not a part of the W3C spec.
require 'watir'
browser = Watir::Browser.new :firefox
bridge = browser.driver.session_storage.instance_variable_get(:#bridge)
server_uri = bridge.instance_variable_get(:#http).instance_variable_get(:#server_url)
sid = bridge.instance_variable_get(:#session_id)
driver_path = "session/#{sid}/moz/screenshot/full"
request_url = server_uri.to_s + driver_path
url = URI.parse(request_url)
req = Net::HTTP::Get.new(request_url)
raw = Net::HTTP.start(url.host, url.port) {|http| http.request(req) }.body
base64_screenshot = JSON.parse(raw, symbolize_names: true)[:value]
This approach is also now an option in the watir-screenshot-stitch gem:
require 'watir-screenshot-stitch'
b = Watir::Browser.new :firefox
b.goto "https://github.com/mozilla/geckodriver/issues/570"
base64_screenshot = b.base64_geckodriver

How to set chrome browser window resolution in jenkins

Am running the Selenium webdriver(Maven Project) Scripts through Jenkins by calling pom.xml file. I have set below mentioned browser resolution
driver.manage().window().maximize();
Dimension defaultSize = new Dimension(2560,1440);
driver.manage().window().setSize(defaultSize);
However, while running the scripts through Jenkins, Chrome browser window is not set to the new dimension.
Note : In Local machine it's working fine..
Copied from my question - GOCD pipeline, Selenium ChromeDriver window size is not set
his issue looks to have been caused by two issues,
1- When mvn clean test is run from the IDE this process runs under your current user. However, when run by the Continuous Integration environment, the process is owned by the System process. so does not have the same access to resources.
2 When run from the IDE, chrome will pop up. When run from the CI environment I assumed that it defaulted chrome to run in headless mode. It does not, you have to set the --headless argument so my configuration that now works is as follows
public class GoogleChrome extends Base {
private static final Logger logger = LogManager.getLogger(GoogleChrome.class);
private String rootPath = System.getProperty("user.dir").replace("\\","/");
#Autowired
protected WebDriver driver;
public WebDriver startChromeDriver() {
logger.info("Chrome driver path : " + rootPath + "/../Tools/Drivers/chromedriver.exe");
System.setProperty("webdriver.chrome.driver", rootPath + "/../Tools/Drivers/chromedriver.exe");
Map<String, Object> prefs = new HashMap<String, Object>();
logger.info("Disabling Chrome's credentials service");
prefs.put("credentials_enable_service", false);
logger.info("Disabling Chrome's password manager");
prefs.put("password_manager_enabled", false);
final String regex = "^\\D*$";
final Pattern pattern = Pattern.compile(regex, Pattern.MULTILINE);
final Matcher matcher = pattern.matcher(System.getProperty("user.name"));
boolean isHuman = matcher.matches();
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("prefs", prefs);
logger.info("Disabling Chrome's info bars");
options.addArguments("disable-infobars");
options.addArguments("--incognito");
options.addArguments("--disable-gpu");
options.addArguments("--no-sandbox");
options.addArguments("--allow-insecure-localhost");
if (isHuman){
logger.info("Chrome starting maximized - isHuman: " +isHuman + " process run by " +System.getProperty("user.name"));
options.addArguments("--start-maximized");
} else {
logger.info("Chrome starting headless - isHuman: " +isHuman + " process run by " +System.getProperty("user.name")) ;
options.addArguments("--headless");
options.addArguments("--window-size=1980,1080");
}
options.setAcceptInsecureCerts(true);
try {
logger.info("Killing Chrome browser");
Runtime.getRuntime().exec("taskkill /F /IM chrome.exe");
} catch (IOException e) {
logger.error("Task Kill IOException : " + e.getMessage());
}
logger.info("Starting Chrome browser...");
sleep(2);
driver = new ChromeDriver(options);
logger.info("Window size: "+ driver.manage().window().getSize());
driver.manage().timeouts().implicitlyWait(1, TimeUnit.SECONDS);
return driver;
}
}
Chrome disallows setting the size larger than the system's screen resolution width, the problem may be this in your case. Some workaround could be to maximize the window to at least have the largest window available on that system.
While sometimes old chromedriver also cause the issue
If still problem exist then you can change the resolution by chrome option as :
chromeOptions.addArguments("window-size=1936,1056");
Full code will be like :-
System.setProperty("webdriver.chrome.driver","D:\\Workspace\\JmeterWebdriverProject\\src\\lib\\chromedriver.exe");
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("window-size=1936,1056");
WebDriver driver = new ChromeDriver(chromeOptions);
driver.get("https://www.google.co.in/");
Hope it will help you :)

Disable geolocation in selenium-chromedriver with python

Want to disable automatic geoloaction in Chrome using Chromedriver when I visit a https website.
Tryed:
from selenium.webdriver.chrome.options import Options
chromeOptions = webdriver.ChromeOptions()
prefs = {"profile.default_content_settings.geolocation" : "2"}
chromeOptions.add_experimental_option("prefs",prefs)
driver = webdriver.Chrome(chrome_options=chrome_options)
And:
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_argument("--disable-extensions")
driver = webdriver.Chrome(chrome_options=chrome_options)
Both doesn't work because on every new chrome window created with chromedriver the geolocation is enabled.
your pref key is incorrect, below code worked for me
options = webdriver.ChromeOptions()
prefs = {"profile.default_content_setting_values.geolocation" :2}
options.add_experimental_option("prefs",prefs)
driver = webdriver.Chrome(chrome_options=options)
Below code is working for me on July 2018
ChromeOptions options = new ChromeOptions();
Map<String, Object> prefs = new HashMap<String, Object>();
prefs.put("profile.managed_default_content_settings.geolocation", 2);
options.setExperimentalOption("prefs", prefs);
ChromeDriver = new ChromeDriver(options);
Saludos.

has no authority to load: sdk/window/utils (Firefox addon SDK)

In my Main.js
const { getMostRecentBrowserWindow } = require('sdk/window/utils');
var chromewin = getMostRecentBrowserWindow();
chromewin.PrintUtils.printPreview(chromewin.PrintPreviewListener);
Browser console warning: "Module: .../main has no authority to load: sdk/window/utils"
Your addon contains a corrupted or otherwise incomplete harness-options.json. Either rebuild your addon with a fresh copy of Addon SDK, or (more tricky) manually edit harness-options.json so that under the requirements section all required modules are listed.
Hmm I would try this instead:
const { getMostRecentBrowserWindow } = require('sdk/window/utils');
getMostRecentBrowserWindow().PrintUtils.printPreview(getMostRecentBrowserWindow().PrintPreviewListener);
My guess is that you are trying to use your chromewin ref after that window has closed.

How to disable Firefox's untrusted connection warning using Selenium?

Trying to find a way to disable Firefox from raising a warning every time a connection uses an "untrusted" certificate, with Selenium. I believe that the kind of solution that would work the best would be to set one of the browser preferences.
Just found this from the Mozilla Foundation bug link and it worked for me.
caps.setCapability("acceptInsecureCerts",true)
I found this comment on enabling this functionality in Selenium for Java. There is also this StackOverflow question about the same issue, also for Java For Python, which was my desired target language, I came up with this, through browsing the FirefoxProfile code:
profile = webdriver.FirefoxProfile()
profile.accept_untrusted_certs = True
Which, as far as I have tested, has produced the expected behavior.
Hope this helps somebody!
No need of custom profiles to deal with "Untrusted connection" on WebDriver
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
driver = new FirefoxDriver(capabilities);
None of the above answers worked for me. I'm using:
https://github.com/mozilla/geckodriver/releases/download/v0.12.0/geckodriver-v0.12.0-win64.zip
Firefox 50.1.0
Python 3.5.2
Selenium 3.0.2
Windows 10
I resolved it just by using a custom FF profile which was easier to do than I expected. Using this info https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles#w_starting-the-profile-manager on how to make a custom profile, I did the following:
1) Made a new profile
2) Manually went to the site in FF to raise the untrusted certificate error
3) Add a site exception (when the error is raised click advanced and then add exception)
4) confirm the exception works by reloading the site (you should no longer get the error
5) Copy the newly create profile into your project (for me it's a selenium testing project)
6) Reference the new profile path in your code
I didn't find any of the following lines resolved the issue for me:
firefox_capabilities = DesiredCapabilities.FIREFOX
firefox_capabilities['handleAlerts'] = True
firefox_capabilities['acceptSslCerts'] = True
firefox_capabilities['acceptInsecureCerts'] = True
profile = webdriver.FirefoxProfile()
profile.set_preference('network.http.use-cache', False)
profile.accept_untrusted_certs = True
But using a custom profile as mentioned above did.
Here is my code:
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
firefox_capabilities = DesiredCapabilities.FIREFOX
firefox_capabilities['marionette'] = True
#In the next line I'm using a specific FireFox profile because
# I wanted to get around the sec_error_unknown_issuer problems with the new Firefox and Marionette driver
# I create a FireFox profile where I had already made an exception for the site I'm testing
# see https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles#w_starting-the-profile-manager
ffProfilePath = 'D:\Work\PyTestFramework\FirefoxSeleniumProfile'
profile = webdriver.FirefoxProfile(profile_directory=ffProfilePath)
geckoPath = 'D:\Work\PyTestFramework\geckodriver.exe'
browser = webdriver.Firefox(firefox_profile=profile, capabilities=firefox_capabilities, executable_path=geckoPath)
browser.get('http://stackoverflow.com')
From start to finish with all the trimmings, in C#. Note that I had installed FFv48 to a custom directory because GeckoDriver requires that specific version.
var ffOptions = new FirefoxOptions();
ffOptions.BrowserExecutableLocation = #"C:\Program Files (x86)\Mozilla Firefox48\firefox.exe";
ffOptions.LogLevel = FirefoxDriverLogLevel.Default;
ffOptions.Profile = new FirefoxProfile { AcceptUntrustedCertificates = true };
var service = FirefoxDriverService.CreateDefaultService(ffPath, "geckodriver.exe");
var Browser = new FirefoxDriver(service, ffOptions, TimeSpan.FromSeconds(120));
In my case I was using Marionette driver instead of Firefox driver. There is an acknowledged bug (https://bugzilla.mozilla.org/show_bug.cgi?id=1103196) for it. In the meantime I'm using Firefox driver instead:
DesiredCapabilities dc = DesiredCapabilities.firefox();
dc.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
FirefoxProfile profile = new FirefoxProfile();
profile.setAcceptUntrustedCertificates(true);
dc.setCapability(FirefoxDriver.PROFILE, profile);
// this is the important line - i.e. don't use Marionette
dc.setCapability(FirefoxDriver.MARIONETTE, false);
Webdriver driver = new FirefoxDriver(dc);
C#: Something have changed as options now has own attribute for this.
var ffOptions = new FirefoxOptions();
ffOptions.AcceptInsecureCertificates = true;
Driver = new FirefoxDriver(ffOptions);
Hope this helps.
I added the below and then it worked for me
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setAcceptInsecureCerts(true);
WebDriver driver = new FirefoxDriver(desiredCapabilities);
For me, using PHP facebook/webdriver I set create a profile and authorised the certified. The name of profile was selenium.
Next I initialise my selenium 3:
java -jar -Dwebdriver.firefox.profile=selenium selenium-server-standalone-3.0.1.jar
Then in FirefoxDriver.php
I set const PROFILE = 'selenium';
This worked for me.
For Firefox driver and Java add these lines:
WebDriver driver;
ProfilesIni profile = new ProfilesIni();
FirefoxProfile testprofile = profile.getProfile("default");
testprofile.setAcceptUntrustedCertificates(true);
testprofile.setAssumeUntrustedCertificateIssuer(true);
driver = new FirefoxDriver(testprofile);
If you use geckodriver don't forget to add this before profile initialization:
System.setProperty("webdriver.gecko.driver","<PATH_TO_GECKODRIVER>\\geckodriver.exe");
In Java you have to use DesiredCapabilities.setAcceptInsecureCerts(). To get a FirefoxDriver with custom capability and profile do the following:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setAcceptInsecureCerts(true);
FirefoxProfile profile = new FirefoxProfile();
profile.set*...
FirefoxOptions options = new FirefoxOptions();
options.addCapabilities(capabilities);
options.setProfile(profile);
new FirefoxDriver(options);
In my case this did the trick
FirefoxOptions options = new FirefoxOptions();
options.addCapabilities(new ImmutableCapabilities(ImmutableMap.of(
CapabilityType.ACCEPT_SSL_CERTS, true,
CapabilityType.ACCEPT_INSECURE_CERTS, true)));
WebDriver driver = new FirefoxDriver(options);
Above solution worked for me on Firefox 54.0b9 (64-bit). This is my code.
Create your capabilities
Create FF Profile with your requirements
Add 1. & 2. to Firefox Options and pass it to FirefoxDriver
Like below
capabilities = new DesiredCapabilities().firefox();
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
//Accept Untrusted connection and to download files
FirefoxProfile profile = new FirefoxProfile();
profile.setAcceptUntrustedCertificates(true);
profile.setAssumeUntrustedCertificateIssuer(false);
profile.setPreference("dom.file.createInChild", true);
profile.setPreference("browser.download.folderList", 1);
profile.setPreference("browser.helperApps.alwaysAsk.force", false);
profile.setPreference("browser.download.manager.showWhenStarting"
,false);
profile.setPreference("pdfjs.disabled", true );
profile.setPreference("browser.helperApps.neverAsk.saveToDisk"
,"application/pdf;image/jpg;image/jpeg;text/html;text/plain;application/zip;application/download");
System.setProperty("webdriver.gecko.driver", config.getGeckoDriver());
capabilities.setCapability(FirefoxDriver.PROFILE, profile);
FirefoxOptions options = new FirefoxOptions();
options.addCapabilities(capabilities);
options.setProfile(profile);
driver=new FirefoxDriver(options);
This configuration works for me in PHP
public function setUp()
{
$this->setHost('localhost');
$this->setPort(4444);
$this->setBrowserUrl('https://example.loc');
$this->setBrowser('firefox');
$this->setDesiredCapabilities(["acceptInsecureCerts" => true]);
}
For Firefox I run
java -jar selenium-server-standalone-3.8.1.jar -enablePassThrough false
I was having this issue useing Node JS and Selenium. Searched everywhere but could not find anything.
Finally got it. Maybe this will help someone.
var webdriver = require('selenium-webdriver');
driver = new webdriver.Builder()
.withCapabilities({'browserName': 'firefox', acceptSslCerts: true, acceptInsecureCerts: true})
.build()
for PHP please use below code
$serverUrl = 'http://localhost:4444/wd/hub';
$capabilities = new DesiredCapabilities(
[
'browserName' => 'firefox',
'proxy' => [
'proxyType' => 'manual',
'httpProxy' => 'localhost:0000',
'sslProxy' => 'localhost:XXXX',
],
]
);
$capabilities->setCapability('acceptInsecureCerts',True);
$driver = RemoteWebDriver::create($serverUrl, $capabilities,60*1000,60*1000);

Resources