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

Date element can not be accessed with behat if it is part of the group

XMLWordPrintable

      Form:

              $group[] =& $mform->createElement('select', 'expirydatetypepast', '', $choices);
              $group[] =& $mform->createElement('date_time_selector', 'expirydateabsolutepast', '');
              $mform->addGroup($group, 'expirydateformgrouppast', $expirydatestr, ' ', false);
      

      Behat:

          And I set the following fields to these values:
            | expirydatetypepast           | Select date       |
            | expirydateabsolutepast  | ##-60 days## |
      

      This does not work. The xpath for the date element does not allow to reference element by name nor does it allow to target an element that is a part of the group

            marina Marina Glancy
            marina Marina Glancy
            Paul Holden Paul Holden
            Simey Lameze Simey Lameze
            CiBoT CiBoT
            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 - 4 hours, 12 minutes
                4h 12m

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