我在laravel中安装了硒并运行
通过自动成功打开网站,但出现错误
这是我收到的错误
invalid argument: invalid 'domain' (Session info: chrome=74.0.3729.169)
(Driver info: chromedriver=74.0.3729.6
(255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-
heads/3729@{#29}),platform=Windows NT 10.0.17134 x86_64)
和我在控制器中的测试代码
1: <?php
2: namespace App\WebDriver;
3: use \App\WebDriver\Remote\DesiredCapabilities;
4: use \App\WebDriver\Remote\RemoteWebDriver;
5: Class Test {
6: public function aa()
7: {
8: // start Chrome with 5 second timeout
9: $host = 'http://localhost:4444/wd/hub'; // this is the default
10: $capabilities = DesiredCapabilities::chrome();
11: $driver = RemoteWebDriver::create($host, $capabilities, 5000);
12:// navigate to 'http://www.seleniumhq.org/'
13: $driver->get('https://www.seleniumhq.org/');
14:// adding cookie
15: $driver->manage()->deleteAllCookies();
16: $cookie = new Cookie('cookie_name', 'cookie_value');
17: $driver->manage()->addCookie($cookie);
18: $cookies = $driver->manage()->getCookies();
19: print_r($cookies);
错误行:(17)
怎么了?我安装有误?
请告诉我该怎么做,,,,, 并且感谢您看到我的帖子和我的英语水平太低了,因此,如果我输入有误,请原谅我。