Closed strika closed 10 years ago
I believe this is fixed and can be closed.
Yup, i'm planning to add a bit more test coverage then publish a new version.
So, when fleshing out the testcases here I notice that the value
attribute is being used to match <button>
elements.
However, the value
attribute on buttons does not control their visible UI, their content does.
@strika @Frozenlock @philandstuff - do you have some examples of html / tests you have that use the button element?
If I change to using the button content instead of value
, will this break your tests?
The goal with kerodon is to interact as a user would, so i don't think button value is the right choice here. (there's some WIP on the buttons
branch)
The only way I used the press
function is by giving it a specific button ID:
(-> (session server/app)
....
(press [:#submit-new-project])
....
The button I wish to press looks like this:
<button class="button continue" type="submit">Continue</button>
In this case it might make sense to match the tag content? Would be happy to match by ID or class too.
Cheers for the input guys, I reckon I'll go ahead with the changes to make buttons match on content.
CSS selectors will continue to work as with the current patch
I've just pushed an update to this functionality in ac6dc2c91476cc37d90335030e189a697da32fac
If you get a chance, giving 0.4.0-SNAPSHOT a spin would be great.
Tested :+1: here https://github.com/strika/servisne.info/pull/13.
Thanks.
@glenjamin same here :+1:
0.4.0 released!
Hooray! :whale:
:clap:
Let me know if I'm missing something, but it looks like that
press
is working only with<input type="submit">
and not with<button>
. Is there a way to interact with buttons?Thanks.