Answer the question
In order to leave comments, you need to log in
Selenium IDE unloading tests in php. How to make it work with minimal intervention in the code?
Good day, dear friends.
I will try to describe to you the essence of the problem. Well... let's start.
Install selenium IDE in firefox and add. upload plugin in php.
We have two upload options:
class Example extends PHPUnit_Extensions_SeleniumTestCase
{
protected function setUp()
{
$this->setBrowser("*chrome");
$this->setBrowserUrl("https://www.google.ru/");
}
public function testMyTestCase()
{
$this->open("/");
$this->type("name=q", "Да как заставить тебя работать?");
$this->click("name=btnG");
$this->waitForPageToLoad("30000");
}
}
$this->setBrowser("chrome");
$this->open("/");
abstract class PHPUnit_Extensions_Selenium2TestCase extends PHPUnit_Framework_TestCase
$this->setBrowser("chrome");
$this->setBrowserUrl("https://www.google.ru/");
public function setBrowser($browserName)
{
if (!is_string($browserName)) {
throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
}
$this->parameters['browserName'] = $browserName;
}
public function setBrowserUrl($browserUrl)
{
if (!is_string($browserUrl)) {
throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
}
$this->parameters['browserUrl'] = new PHPUnit_Extensions_Selenium2TestCase_URL($browserUrl);
}
<?php
require_once 'Testing/Selenium.php';
class Example extends PHPUnit_Framework_TestCase
{
protected function setUp()
{
$this = new Testing_Selenium("*chrome", "https://www.google.ru/")
$this->open("/");
$this->type("name=q", "Да как заставить тебя работать?");
$this->click("name=btnG");
$this->waitForPageToLoad("30000");
}
}
?>
require_once 'Testing/Selenium.php';
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question