Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

findFormButton() is case sensitive when search for attributes #618

Closed
beckenkamp opened this issue Oct 30, 2014 · 4 comments
Closed

findFormButton() is case sensitive when search for attributes #618

beckenkamp opened this issue Oct 30, 2014 · 4 comments

Comments

@beckenkamp
Copy link

When getFormField() tries to find form button with findFormButton() it throws ElementNotFoundException. This happens when the button have type attribute setted as "Submit" instead of "submit".

I understand that it is a stupid thing set element attributes like that example, but I gues I should report this anyway...

foreach ($xpath->query('descendant::input | descendant::button', $root) as $node) {
    if ('button' == $node->nodeName || in_array($node->getAttribute('type'), array('submit', 'button', 'image'))) {
        return $node;
    }
}

When I added "Submit" at the in_array() function, showed above, to test, it worked.

@aik099
Copy link
Member

aik099 commented Oct 30, 2014

Which driver are you using?

@aik099
Copy link
Member

aik099 commented Oct 30, 2014

The getFormField method exists in MinkBrowserKitDriver, so please report this issue there. And I can confirm that at least canSubmitForm method of the driver doesn't do case-insensitive type attribute check.

@beckenkamp
Copy link
Author

Ok, I'm sorry for the trouble.

I'll report there.

@aik099
Copy link
Member

aik099 commented Oct 30, 2014

Closing in favor of Behat/MinkBrowserKitDriver#89

@aik099 aik099 closed this as completed Oct 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants