Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Pages for different Browsers #190

Open
vaibhavsingh97 opened this issue Aug 5, 2022 · 0 comments
Open

[Enhancement] Pages for different Browsers #190

vaibhavsingh97 opened this issue Aug 5, 2022 · 0 comments

Comments

@vaibhavsingh97
Copy link
Member

We have a page for 'Browser Drivers', with sub-pages for different browser drivers. Users can run the test on Chrome, Firefox and Safari as these pages talk about configuration, but it does not discuss how to run it. IMO, we should have pages in the documentation that talks about set configuration and how to run tests in a specific browser, with a small demo (could be a gif)

We can have separate pages for the following browsers:

  • Chrome
  • Firefox
  • Safari
  • Edge
  • Brave
  • Opera

Structure of a page

  1. Downloading the specific driver
  2. Adding minimal configuration
  3. Run a test using Nightwatch CLI
  4. Demo (Running tests and the specific browser is opening up and running the tests successfully)

Example steps and config to run the test in Brave Browser

We can run your Nightwatch tests on Brave Browser by setting browserName as chrome only and setting the binary option of goog:chromeOptions to the path of brave executable

Sample Config

    chrome: {
      desiredCapabilities: {
        browserName: 'chrome',
        'goog:chromeOptions': {
          // More info on Chromedriver: https://sites.google.com/a/chromium.org/chromedriver/
          //
          // w3c:false tells Chromedriver to run using the legacy JSONWire protocol (not required in Chrome 78)
          w3c: true,
          args: [
            //'--no-sandbox',
            //'--ignore-certificate-errors',
            //'--allow-insecure-localhost',
            // '--headless'
          ],
          binary: '/Applications/Brave Browser.app/Contents/MacOS/Brave Browser'
        }
      }

Here, '/Applications/Brave Browser.app/Contents/MacOS/Brave Browser' represents the location of Brave Browser's binary on Mac and can be modified according to the platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant