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

Acceptance tests failing when running against Chrome due to navbar

XMLWordPrintable

      In Moodle 2.7dev if you run acceptance tests against Chrome you will get several failures because of a positioning bug in chromedriver.

      The driver scrolls elements into view in order to interact with them, however it doesn't account for fixed/absolute positioned elements that may be obscuring the element to interact with despite there being more room to scroll the element out from behind the fixed positioned element and into view.
      In our acceptance tests we hit this in situations where the browser has to scroll down to interact with an element and then scroll up to interact with another.
      When Chrome scrolls up it scroll up so that the element is just within the window. If the element being interacted has a height less than that of the navbar at the top then it isn't actually in view despite the browser having attempted to scroll it into view.

      The following fail is an example of one such failure:

      sudo -u www-data vendor/bin/behat --config moodledata/behat/behat.yml --profile chrome --name "Remove the ability to add the comments block to My home"
      Moodle 2.7beta+ (Build: 20140422), mysqli, e471fc6c9daaa50eab10b58f9a71594239222ec3
      Server OS "Linux", Browser: "chrome"
      Started at 23-04-2014, 14:12
      ...........F--------
       
      (::) failed steps (::)
       
      01. Exception thrown by (//html/.//input[./@type = 'submit' or ./@type = 'image' or ./@type = 'button'][(((./@id = 'Save changes' or ./@name = 'Save changes') or contains(./@value, 'Save changes')) or contains(./@title, 'Save changes'))] | .//input[./@type = 'image'][contains(./@alt, 'Save changes')] | .//button[((((./@id = 'Save changes' or ./@name = 'Save changes') or contains(./@value, 'Save changes')) or contains(normalize-space(string(.)), 'Save changes')) or contains(./@title, 'Save changes'))] | .//input[./@type = 'image'][contains(./@alt, 'Save changes')] | .//*[./@role = 'button'][(((./@id = 'Save changes' or ./@name = 'Save changes') or contains(./@value, 'Save changes')) or contains(./@title, 'Save changes') or contains(normalize-space(string(.)), 'Save changes'))])[1]                       
          unknown error: Element is not clickable at point (549, 15). Other element would receive the click: <div class="container-fluid">...</div>                                                                                                                                  
            (Session info: chrome=34.0.1847.116)                                                                                                                                                                                                                                     
            (Driver info: chromedriver=2.9.248304,platform=Linux 3.13.0-24-generic x86_64) (WARNING: The server did not provide any stacktrace information)                                                                                                                          
          Command duration or timeout: 100 milliseconds                                                                                                                                                                                                                              
          Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:17:32'                                                                                                                                                                                            
          System info: host: 'workstation', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-24-generic', java.version: '1.7.0_55'                                                                                                                           
          Session ID: 6770475c6efd5d99e216cc695429f2a6                                                                                                                                                                                                                               
          Driver info: org.openqa.selenium.chrome.ChromeDriver                                                                                                                                                                                                                       
          Capabilities [{platform=LINUX, acceptSslCerts=true, javascriptEnabled=true, browserName=chrome, chrome={userDataDir=/tmp/.com.google.Chrome.Mm0d4i}, rotatable=false, locationContextEnabled=true, version=34.0.1847.116, takesHeapSnapshot=true, cssSelectorsEnabled=true, databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, nativeEvents=true, webStorageEnabled=true, applicationCacheEnabled=false, takesScreenshot=true}]                                                                                                   
          In step `Given I press "Save changes"'.                                  # behat_forms::press_button()
          From scenario `Remove the ability to add the comments block to My home'. # my/tests/behat/restrict_available_blocks.feature:29
          Of feature `Restrict which blocks can be added to My home'.
      

            samhemelryk Sam Hemelryk
            samhemelryk Sam Hemelryk
            Rajesh Taneja Rajesh Taneja
            Marina Glancy Marina Glancy
            Dan Poltawski Dan Poltawski
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

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