Hi,
Is anyone else seeing problems with Behat not finding an element that is definitely on the page? Seems like there may be an XPath problem...
I have a scenario that starts with:
And I log in as "teacher1"
And I follow "Course 1"
And I follow "Test assignment name"
And I follow "View all submissions"
...and when running it, the first two "I follow" steps are navigated, but it fails on the third (View all submissions", html attached), with this error:
001 Scenario: Teacher/Regsitry can add/view a private comment, Director can only view. Student cannot see at all. # /home/balchd/moodledev/instances/study_M33/moodle/mod/assign/feedback/privatecomments/tests/behat/assignfeedback_privatecomments.feature:61
And I follow "View all submissions" # /home/balchd/moodledev/instances/study_M33/moodle/mod/assign/feedback/privatecomments/tests/behat/assignfeedback_privatecomments.feature:67
The "(//html/.//a
[./@href][((./@id = 'View all submissions' or contains(normalize-space(string(.)), 'View all submissions') or contains(./@title, 'View all submissions') or contains(./@rel, 'View all submissions')) or .//*[(contains(concat(' ', @class, ' '), ' icon ') or name() = 'img') and (contains(./@alt, 'View all submissions') or contains(./@title, 'View all submissions'))])] | //html/.//*
[translate(./@role, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = 'link'][((./@id = 'View all submissions' or contains(./@value, 'View all submissions')) or contains(./@title, 'View all submissions') or contains(normalize-space(string(.)), 'View all submissions'))])[1]" xpath node is not visible and it should be visible (Behat\Mink\Exception\ExpectationException)
I've started trying to debug that XPath, but am currently going round in circles where it seems like I can't even get a basic XSLT "Hello world" working.
Has anyone else come across this?