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

i_change_activity_name_to() behat function doesn't work

    Details

      Description

      I'm trying to use behat_course->i_change_activity_name_to as part of an acceptance test for MDL-44691. If you're a human this would go something like this:

      1. Click the element
      2. Waiting for the input element to appear
      3. While keeping focus, enter the new title
      4. Press enter

      This function doesn't appear to be used anywhere and I don't think it works. This is the behat snippet:

      Given I change "Test assignment name" activity name to "Updated assignment name"

      I get the following error when trying to use it:

      ................F--
       
      (::) failed steps (::)
       
      01. Exception thrown by (//html/.//*[self::input | self::textarea | self::select][not(./@type = 'submit' or ./@type = 'image' or ./@type = 'hidden')][(((./@id = 'title' or ./@name = 'title') or ./@id = //label[contains(normalize-space(string(.)), 'title')]/@for) or ./@placeholder = 'title')] | .//label[contains(normalize-space(string(.)), 'title')]//.//*[self::input | self::textarea | self::select][not(./@type = 'submit' or ./@type = 'image' or ./@type = 'hidden')])[1]
          Element not found with xpath, (//html/.//*[self::input | self::textarea | self::select][not(./@type = 'submit' or ./@type = 'image' or ./@type = 'hidden')][(((./@id = 'title' or ./@name = 'title') or ./@id = //label[contains(normalize-space(string(.)), 'title')]/@for) or ./@placeholder = 'title')] | .//label[contains(normalize-space(string(.)), 'title')]//.//*[self::input | self::textarea | self::select][not(./@type = 'submit' or ./@type = 'image' or ./@type = 'hidden')])[1]
          
          Unable to locate element: {"method":"xpath","selector":"(//html/.//*[self::input | self::textarea | self::select][not(./@type = 'submit' or ./@type = 'image' or ./@type = 'hidden')][(((./@id = 'title' or ./@name = 'title') or ./@id = //label[contains(normalize-space(string(.)), 'title')]/@for) or ./@placeholder = 'title')] | .//label[contains(normalize-space(string(.)), 'title')]//.//*[self::input | self::textarea | self::select][not(./@type = 'submit' or ./@type = 'image' or ./@type = 'hidden')])[1]"}
          For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  1 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    14/Sep/15