I want to render a local HTML file by facebook/php-webdriver.
For example:
$host = 'http://phantomjs:8910/wd/hub'; // webdriver server is on another host
$driver = RemoteWebDriver::create($this->host, DesiredCapabilities::phantomjs());
$driver->get('file:///tmp/test.html');
But it can not load the local file.
It is great that if I could render HTML string:
$text = <<<EOT
<html><head><title>Test HTML</title></head><body><div>TEST BODY</div></body></html>
EOT;
$driver = RemoteWebDriver::create($this->host, DesiredCapabilities::phantomjs());
$driver->getHTML($text);
But there no function to pass it HTML String.
Php-webdriver version: ^1.3
PHP version: 5.6
Selenium server version: Docker image of wernight/phantomjs:2.1.1
Operating system: Debian
What is the best solution for each of these problems.