如何使用会话ID删除硒会话?

时间:2019-06-01 08:01:42

标签: php selenium-webdriver

我的代码创建了几个硒会话,后来在必要时将其删除。我将会话ID存储在文件中。如何根据会话ID删除特定会话?

我尝试重新创建会话ID,然后将其删除。但它返回错误。

RemoteWebDriver::createBySessionID($session_id, $selenium_host_addr)- 
>close();

这是错误消息。

Uncaught Facebook\WebDriver\Exception\WebDriverCurlException: Curl error 
thrown for http DELETE to 
/session/494c153a74e17322ba8a0b0323ad8da5/window <url> malformed in 
/var/www/html/tm.smedia.ca/vendor/facebook/webdriver/lib/Remote/
HttpCommandExecutor.php:292 Stack trace: #0 


/var/www/html/tm.smedia.ca/vendor/facebook/webdriver/lib/Remote/
RemoteWebDriver.php(547): Facebook\WebDriver\Remote\HttpCommandExecutor- 
>execute(Object(Facebook\WebDriver\Remote\WebDriverCommand)) #1 


/var/www/html/tm.smedia.ca/vendor/facebook/webdriver/lib/Remote/
RemoteWebDriver.php(170): Facebook\WebDriver\Remote\RemoteWebDriver- 
>execute('close', Array) #2 


/var/www/html/tm.smedia.ca/services/vroomance_search.php(102):
Facebook\WebDriver\Remote\RemoteWebDriver->close() #3 
/var/www/html/tm.smedia.ca/services/vroomance_search.php(47): 
killAllSeleniumSessions() #4 {main} 

thrown in 
/var/www/html/tm.smedia.ca/vendor/facebook/webdriver/lib/Remote/
HttpCommandExecutor.php on line 292

0 个答案:

没有答案