phpunit-selenium
phpunit-selenium copied to clipboard
elementFromResponseValue doesn't work now
There was a test but in the latest version it was deleted
public function testElementFromResponseValue()
{
$this->url('html/test_open.html');
$elementArray = $this->execute(array(
'script' => 'return document.body;',
'args' => array(),
));
$element = $this->elementFromResponseValue($elementArray);
$this->assertEquals('This is a test of the open command.', $element->text());
}
I am using JavaScript object property that contains dom element to get elements
$dom = $this->execute
(
array(
"script" => "return AddNewUsersBtn.dom;",
'args' => array()
)
);
return $this->elementFromResponseValue($dom);
After latest updates it doesn't work.
I've tried to use
return PHPUnit_Extensions_Selenium2TestCase_Element::fromResponseValue($dom, $this->getSessionUrl()->descend('element'), ???);
but I can't figure out where can I get driver instance for the third parameter.
How can I get driver instance? Or is there another way to get elements using dom element?