I am trying to execute a javascript code using PHPUnit Command. It executes the PHP code and sends email and other stuffs.
But there is some javascript code inside that php file that sends some data to third party url. That seems to be not working.
Any thoughts as how to execute the javascript code?
For those who are using PHPUnit_Extensions_Selenium2TestCase and come hia from google.
@see https://github.com/sebastianbergmann/phpunit-selenium/issues/160
It should be as:
$this->execute(array(
'script' => $javaScriptCode,
'args' => array()
));
Using the instaclick webdriver you can execute javascript by using execute
for example:
$this->session->execute(array('script' => $script, 'args' => array())
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With