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

Behat: Use of xpath name() is not compatible with Firefox

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE
    • MDL-72849-master
    • Hide
      1. Put the attached mdl72849.feature into lib/tests/behat folder
      2. Run Behat init
      3. Run Behat in Chrome with --tags '@mdl72849'
      4. Run Behat in Firefox with --tags '@mdl72849'

      Both Behat tests should pass. (Before this change, the Chrome one still passes but in Firefox it fails.)

      Show
      Put the attached mdl72849.feature into lib/tests/behat folder Run Behat init Run Behat in Chrome with --tags '@mdl72849' Run Behat in Firefox with --tags '@mdl72849' Both Behat tests should pass. (Before this change, the Chrome one still passes but in Firefox it fails.)

      If you do the following command in browser console:

      $x('name(//h2)')
      

      It returns 'H2' in Firefox and 'h2' in Chrome.

      As a result, the use of name() = 'img' in Behat xpath does not give consistent results across browsers in all cases. This only has an effect if it's trying to find a link containing an image with alt text where the image does not have the 'icon' CSS class.

      I searched and only found those two usages.

        1. mdl72849.feature
          0.6 kB
        2. MDL-72849_Error.png
          MDL-72849_Error.png
          369 kB
        3. working-on-developer-branch.png
          working-on-developer-branch.png
          26 kB
        4. MDL-72849_Test Passed.png
          MDL-72849_Test Passed.png
          313 kB

            quen Sam Marshall
            quen Sam Marshall
            Andrew Lyons Andrew Lyons
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 15 minutes
                2h 15m

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