As described in issue #26, just using the 'type' method for filling out forms can be quite slow if the attribute you are using for finding the form element is not the id. Given that when you are writing tests, you are going to know what kind of selector you are using, this PR provides new methods for typing in fields that are found with a specific selector type.
So instead of
$this->type('foo', '#bar');
you can do
$this->typeByCssSelector('foo', '#bar')
the three typing methods are:
typeById
typeByName
typeByCssSelector
I have followed the current approach to the tests to implement basic tests of these methods. These tests don't actually verify that the text is entered into the fields, but I figured that the current approach is considered sufficient (i.e. no exception is being thrown by selenium), and I didn't want to spend a lot of time trying to extend the testing strategy if it's not been necessary up until now.
As described in issue #26, just using the 'type' method for filling out forms can be quite slow if the attribute you are using for finding the form element is not the id. Given that when you are writing tests, you are going to know what kind of selector you are using, this PR provides new methods for typing in fields that are found with a specific selector type.
So instead of
$this->type('foo', '#bar');
you can do
$this->typeByCssSelector('foo', '#bar')
the three typing methods are:
typeById
typeByName
typeByCssSelector
I have followed the current approach to the tests to implement basic tests of these methods. These tests don't actually verify that the text is entered into the fields, but I figured that the current approach is considered sufficient (i.e. no exception is being thrown by selenium), and I didn't want to spend a lot of time trying to extend the testing strategy if it's not been necessary up until now.