I'd like to do something like:
// pseudocode
$this->byCssSelector('p')->setAttribute('attributename', 'attributevalue');
How to do that in phpunit-selenium?
I'd like to do something like:
// pseudocode
$this->byCssSelector('p')->setAttribute('attributename', 'attributevalue');
How to do that in phpunit-selenium?
You need to use execute() to execute javascript and set the attribute using setAttribute():
$this->execute(array(
'script' => "document.getElementById('my_id').setAttribute('name', 'value');",
'args' => array()
));