From 4995fc6f254d66fe783dda6ea9ce13be5cd8b43f Mon Sep 17 00:00:00 2001 From: jaden <noreply@example.com> Date: Fri, 2 Jun 2017 15:49:53 +0200 Subject: [PATCH] docs section about multi-browser testing, #29 --- doc/admin/installation.rst | 21 +++++++++++++++++++++ protractor-conf.js | 10 ++++++++++ 2 files changed, 31 insertions(+) diff --git a/doc/admin/installation.rst b/doc/admin/installation.rst index 8011c693b..3bf7ce19c 100644 --- a/doc/admin/installation.rst +++ b/doc/admin/installation.rst @@ -288,6 +288,27 @@ For example, to add the test file ``example-spec.js``: 'example-spec.js' ], +Overriding Protractor's browser choices +======================================= + +In ``protractor-conf.js``, add a ``multiCapabilities`` option in the following format: + +.. code:: javascript + + multiCapabilities: [ + { + browserName: '<browser name 1>' + }, + { + browserName: '<browser name 2>' + }, + ... + ] + +.. note:: + + You may need to download your browsers' WebDrivers separately - see `the official Selenium docs <https://seleniumhq.github.io/docs/wd.html#quick_reference>`_. + Writing Protractor tests ======================== diff --git a/protractor-conf.js b/protractor-conf.js index 3a546abfb..b775b755b 100644 --- a/protractor-conf.js +++ b/protractor-conf.js @@ -7,6 +7,16 @@ exports.config = { ], allScriptsTimeout: 60000, + // to override the default browser that Protractor uses: + // give a list of browsers to use (firefox, chrome, safari, etc.) + // e.g.: + //multiCapabilities: [{ + // browserName: 'firefox' + //}, + //{ + // browserName: 'chrome' + //}], + // disable some selenium~browser notification than can steal focus notify: false, -- GitLab