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

Recent chrome browser + webdriver combos lead to all test failing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 3.1.10, 3.2.7, 3.3.4, 3.4.1, 3.5
    • Fix Version/s: None
    • Labels:
      None
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE

      Description

      Using here:

      • Mac.
      • Chrome 62 and 63 tried.
      • Chromedriver 2.33 and 2.35 tried.
      • Selenium 3.1 and 3.8.1 tried.

      Practically all tests end with the message:

       BeforeScenario # behat_hooks::before_scenario_hook()
            unknown error: failed to change window state to normal, current state is maximized
              (Session info: chrome=63.0.3239.132)
              (Driver info: chromedriver=2.35.528157 (4429ca2590d6988c0745c24c8858745aaaec01ef),platform=Mac OS X 10.13.2 x86_64) (WebDriver\Exception\UnknownError)
      

      It didn't happen with earlier versions. Seems to be related with changing window position and/or size (that we do often at the beginning of every test). Found this issue, but was closed won't fix:

      https://bugs.chromium.org/p/chromedriver/issues/detail?id=2173

      Have tried changing the size but apparently that did not help:

      diff --git a/lib/tests/behat/behat_hooks.php b/lib/tests/behat/behat_hooks.php
      index d5254b1b5d..e4108fee36 100644
      --- a/lib/tests/behat/behat_hooks.php
      +++ b/lib/tests/behat/behat_hooks.php
      @@ -383,7 +383,7 @@ class behat_hooks extends behat_base {
               }
       
               // Run all test with medium (1024x768) screen size, to avoid responsive problems.
      -        $this->resize_window('medium');
      +        $this->resize_window('large');
           }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stronk7 Eloy Lafuente (stronk7)
                Reporter:
                stronk7 Eloy Lafuente (stronk7)
                Participants:
                Component watchers:
                Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: