PhantomJS web driver stays in memory

0 votes

I am instantiating PhantomJSDriver in C# using the following code:

Driver = new PhantomJSDriver();

And I am cleaning it up with the below code:

Driver.Dispose();
Driver = null;

I want to understand that "Should this process exit or stay in memory?"

 If it is supposed to stay in memory, can I kill it programmatically?

Jul 10, 2018 in Selenium by Atul
• 10,240 points
676 views

1 answer to this question.

0 votes

Driver.Dispose(); shouldn't be used to clean up the WebDriver instance. 

We must be using Driver.Quit(); for proper cleanup. 

Driver.Close(); is used to close the current page or the browser.

Driver.Quit(); is used to close all the tabs/windows.

Thus, Driver.Quit() method is the only way to terminate the session.

answered Jul 10, 2018 by Meci Matt
• 9,460 points

Related Questions In Selenium

0 votes
0 answers

How to Create Object Repository in Selenium Web Driver?

I wanted to know how to create ...READ MORE

Apr 17, 2018 in Selenium by Shubham
• 13,490 points
1,964 views
0 votes
1 answer
0 votes
1 answer

Web-scraping with beautifulsoup in different siblings

The tags are not closed in your ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,500 points
981 views
0 votes
1 answer

How do i change the location where my file gets downloaded in Selenium Webdriver and firefox driver?

There are a couple of errors there. ...READ MORE

answered Apr 13, 2018 in Selenium by nsv999
• 5,500 points
6,184 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
13,649 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,131 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
7,209 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,865 views
0 votes
2 answers

Get text using selenium web driver in python

text = driver.find_element_by_class_name("current-text").getText(); ...READ MORE

answered Feb 4, 2019 in Selenium by anonymous
38,100 views
0 votes
1 answer

Setting browser width and height in Selenium Web Driver

For me, the only thing that worked ...READ MORE

answered Jul 19, 2018 in Selenium by Meci Matt
• 9,460 points
1,158 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP