MinkExtension icon indicating copy to clipboard operation
MinkExtension copied to clipboard

Alt attribute on buttons is not working

Open sloba88 opened this issue 9 years ago • 2 comments

Hi,

The "alt" attribute on button is not clickable with "I press" method and this line https://github.com/Behat/MinkExtension/blob/master/src/Behat/MinkExtension/Context/MinkContext.php#L77 is misleading because it says you can use "alt" attribute on a button and it doesn't work either with <button alt="foo"> or <input type="submit" alt="foo" />

I don't know if this ever worked but it's not working now for me on master branch. I am using selenium standalone as a driver version 2.48.2 if that has something to do with it...

sloba88 avatar Dec 28 '15 10:12 sloba88

The alt attribute does not make sense for <button>. Buttons with a alt which is matched are <input type="image" alt="foo" /> (yes, this is a button in HTML)

stof avatar Dec 28 '15 10:12 stof

I agree but I used it exactly because it's not used anywhere else and I didn't want to tie tests to other changeable attributes.

Anyway I think "alt" should be removed from the given line and throwed exception for buttons only.

sloba88 avatar Dec 28 '15 10:12 sloba88