Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98817

Why is driver.quit() killing memory?

$
0
0

I'm trying to run a bunch of tests on selenium. after every test I was using driver.quit() method but using this method does not free the ram and I run out of memory after I while. I changed it with driver.close() and it works great. After reading about both methods for a while I am still expecting the opposite. What is the reason of this behaviour ?

Here is my code:

<?php 
$driver = RemoteWebDriver::create(env("SELENIUM_HOST"), DesiredCapabilities::chrome());
$driver->get($url);
$driver->findElement(WebDriverBy::cssSelector('#selector'))->getText();
$driver->close();
// or : $driver->quit();




Viewing all articles
Browse latest Browse all 98817

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>