In a functional test in symfony, sfTestBrowser provides methods
- click() “Simulates a click on a link or button.”
- select() “Simulates selecting a checkbox or radiobutton.”
and unselect().
But I have not found a way to simulate making a selection from a <select> element.
Does anybody know a way to do this?
This has troubled me too. I’m assuming you just want to set the value for form submission? If you know the value, you can of course just do
But usually I don’t know the value I want posted, because it’s from a database-driven select box. So my solution is
Frustrating because you have to break out of the $browser call chain, in order to use getResponseDomCssSelector(), but I haven’t found an easier way.