Need to know how phantomjs execution is stopped

0 votes

I started and closed phantomjs in Python using:

from selenium import webdriver    
driver = webdriver.PhantomJS()
driver.get(url)
html_doc = driver.page_source
driver.close()

But inspite of that, there is an instance of phantomjs in my MAC Activity Monitor. And everytime, I run the script, a new phantomjs process is created.
How do I close the instance of the driver?

May 23, 2018 in Selenium by abc_xyz
24 views

1 answer to this question.

0 votes
Actually, the .close() method is not the best way to release all resources associated with a driver instance. You can rather use .quit() method to free all resources of a driver, including exiting the executable process.
answered May 23, 2018 by sniffy_god
• 780 points

Related Questions In Selenium

0 votes
1 answer
0 votes
1 answer

Need to perform parallel execution (multiple browser sessions) with Selenium & TestNG by using @BeforeSuite

@Beforesuite annotated method runs before the testNG.XML ...READ MORE

answered Mar 30, 2018 in Selenium by nsv999
• 5,110 points
1,579 views
0 votes
2 answers
0 votes
1 answer

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,110 points
992 views
0 votes
1 answer
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,130 points
1,143 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
888 views
0 votes
1 answer

Need to select an IFrame with selenium (python)

Well for me, something like this worked. ...READ MORE

answered May 3, 2018 in Selenium by sniffy_god
• 780 points
1,168 views
+1 vote
2 answers