Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-77944

Rename chromeOptions to goog:chromeOptions

XMLWordPrintable

    • MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE
    • MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE
    • MDL-77944-401
    • MDL-77944-master
    • Hide
      1. Download latest version of Selenium (4.8.3 at time of writing)
      2. Grab Andrew's magic browser config tool and add it to your Moodle config.php as in the setup:

        require_once('/path/to/moodle-browser-config/init.php');
        

      3. Initialise behat

        php admin/tool/behat/cli/init.php
        

        or simply use mdk behat

      1. Inspect the generated behat.yml
        1. Confirm that there is only a goog:chromeOptions dictionary and no chromeOptions without prefix
      2. Init the downloaded selenium:

        /usr/bin/java -jar /path/to/selenium-server-4.8.3.jar standalone
        

      3. Run a behat run on a javascript behat feature using the headlesschrome profile:

        $ vendor/bin/behat --config /path/to/site/moodledata_behat/behatrun/behat/behat.yml --profile=headlesschrome --name="Use select and deselect all buttons"
        

        1. Confirm the test was executed headless without opening the browser
      Show
      Download latest version of Selenium (4.8.3 at time of writing) Grab Andrew's magic browser config tool and add it to your Moodle config.php as in the setup: require_once('/path/to/moodle-browser-config/init.php'); Initialise behat php admin/tool/behat/cli/init.php or simply use mdk behat Inspect the generated behat.yml Confirm that there is only a goog:chromeOptions dictionary and no chromeOptions without prefix Init the downloaded selenium: /usr/bin/java -jar /path/to/selenium-server-4.8.3.jar standalone Run a behat run on a javascript behat feature using the headlesschrome profile: $ vendor/bin/behat --config /path/to/site/moodledata_behat/behatrun/behat/behat.yml --profile=headlesschrome --name="Use select and deselect all buttons" Confirm the test was executed headless without opening the browser

      Encountered because Chrome and Selenium have changed how we pass headless args.

      The chromeOptions dictionary is from before w3c time, and we can't really support non-w3c browesr control any more because Selenium has dropped it.

      We should rename to the w3c version, which is vendor-prefixed, that is:

      Rename chromeOptions to goog:chromeOptions.

      Some references:

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Simey Lameze Simey Lameze
            Paul Holden Paul Holden
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 36 minutes
                3h 36m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.