Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Cyber Security
  3. Question
Cyber Security

Is there a selenium close browser option at the end of a selenium test?

Asked by Ankit Chauhan Oct 18, 2022 1.0K views 1 answer
Share

About this question

I have googled for the answer, but the .stop() so frequently mentioned doesn't work for me. The Chrome window the test was running in remains open.


def test_getResults(self):
    sel = selenium('localhost', 4444, "*chrome", 'http://blackpearl/')
    sel.start()
    # do stuff
def tearDown(self):
    sel = selenium('localhost', 4444, "*chrome", 'http://blackpearl/')
    sel.close()
    sel.stop()

Any ideas? I'm using Selenium Server 2.8.0 with Python 2.6 and mostly using Chrome 14 windows to test.

Your answer

1 Answer

More Cyber Security discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Cyber Security Blogs

Guides, tips and career advice on Cyber Security from JanBask experts.