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

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

    XMLWordPrintable

Details

    • 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.)

    Description

      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.

      Attachments

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

        Activity

          People

            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

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

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

                Clockify

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