-
Notifications
You must be signed in to change notification settings - Fork 0
/
BasedTest.php
35 lines (28 loc) · 1.07 KB
/
BasedTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
namespace Base;
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Facebook\WebDriver\Remote\WebDriverCapabilityType;
use PHPUnit_Framework_TestCase;
abstract class BasedTest extends PHPUnit_Framework_TestCase
{
/**
* @var RemoteWebDriver
*/
protected $driver;
public $market;
public function setUp()
{
// for run test in cloud
//$capabilities = array(WebDriverCapabilityType::BROWSER_NAME => 'chrome', 'browserstack.debug'=>'true', 'build'=>'First build');
//$this->driver = RemoteWebDriver::create('https://nickfilatov3:[email protected]/wd/hub', $capabilities);
$capabilities = array(WebDriverCapabilityType::BROWSER_NAME => 'firefox');
$this->driver = RemoteWebDriver::create('http://localhost:4444/wd/hub', $capabilities);
$this->driver->manage()->window()->maximize();
$this->driver->get('https://market.yandex.ru');
}
public function tearDown()
{
$this->driver->manage()->deleteAllCookies();
$this->driver->close();
}
}