Closed vukitoso closed 4 years ago
@vebmaster i updated my google chrome to unstable version (75) and use chromedriver on version 74.
Doing this I was able to close the browser by executing 'quit';
@vitorleonel Not work. Window not closed.
Thanks for the report, but it is not reproducible for me right now.
But fell free to open new issue if this prevails in latest versions of Chrome, Chromedriver, latest Selenium 3 , php-webdriver.
Thanks for the report, but it is not reproducible for me right now.
Test №2.
<?php
namespace Facebook\WebDriver;
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Facebook\WebDriver\Exception\WebDriverException;
require_once('vendor/autoload.php'); //Подключаем автолоадер классов
$host = 'http://localhost:9515'; // this is the default
$capabilities = DesiredCapabilities::chrome();
$driver = RemoteWebDriver::create($host, $capabilities, 5000, 10000);
try {
$url_page = 'http://test1.ru/sleep.php';
$driver->navigate()->to($url_page);
echo "Open OK \n";
} catch (WebDriverException $ex) {
echo "1 WebDriverException! \n";
} catch (WebDriverCurlException $ex) {
echo "2 WebDriverCurlException! \n";
}
$driver->quit();
echo "End script";
Result:
D:\opt\OSPanel\modules\php\PHP_7.2\php.exe D:\home\NetBeansProjects\testSelenium\index.php
1 WebDriverException!
Fatal error: Uncaught Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http DELETE to /session/6d2650a35b62f743c826dbe92c069486
Operation timed out after 10000 milliseconds with 0 bytes received in D:\home\NetBeansProjects\testSelenium\vendor\facebook\webdriver\lib\Remote\HttpCommandExecutor.php:297
Stack trace:
#0 D:\home\NetBeansProjects\testSelenium\vendor\facebook\webdriver\lib\Remote\RemoteWebDriver.php(565): Facebook\WebDriver\Remote\HttpCommandExecutor->execute(Object(Facebook\WebDriver\Remote\WebDriverCommand))
#1 D:\home\NetBeansProjects\testSelenium\vendor\facebook\webdriver\lib\Remote\RemoteWebDriver.php(307): Facebook\WebDriver\Remote\RemoteWebDriver->execute('quit')
#2 D:\home\NetBeansProjects\testSelenium\index.php(24): Facebook\WebDriver\Remote\RemoteWebDriver->quit()
#3 {main}
thrown in D:\home\NetBeansProjects\testSelenium\vendor\facebook\webdriver\lib\Remote\HttpCommandExecutor.php on line 297
PHP Fatal error: Uncaught Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http DELETE to /session/6d2650a35b62f743c826dbe92c069486
Operation timed out after 10000 milliseconds with 0 bytes received in D:\home\NetBeansProjects\testSelenium\vendor\facebook\webdriver\lib\Remote\HttpCommandExecutor.php:297
Stack trace:
#0 D:\home\NetBeansProjects\testSelenium\vendor\facebook\webdriver\lib\Remote\RemoteWebDriver.php(565): Facebook\WebDriver\Remote\HttpCommandExecutor->execute(Object(Facebook\WebDriver\Remote\WebDriverCommand))
#1 D:\home\NetBeansProjects\testSelenium\vendor\facebook\webdriver\lib\Remote\RemoteWebDriver.php(307): Facebook\WebDriver\Remote\RemoteWebDriver->execute('quit')
#2 D:\home\NetBeansProjects\testSelenium\index.php(24): Facebook\WebDriver\Remote\RemoteWebDriver->quit()
#3 {main}
thrown in D:\home\NetBeansProjects\testSelenium\vendor\facebook\webdriver\lib\Remote\HttpCommandExecutor.php on line 297
Process finished with exit code 255
Window Chrome NOT CLOSE!
File "sleep.php":
page
<script src="sleep-src.php">
File "sleep-src.php":
<?php
echo "start-";
sleep(90);
echo "end";
What are you trying to achieve? (Expected behavior)
Open the page and close the browser window.
The page that I open for too long gives html (1-4 minutes), so it turns out timeout. The window does not close.
What do you get instead? (Actual behavior)
How could the issue be reproduced? (Steps to reproduce)
Details