Hey guys, I am using Selenium RC to do some test now. And the driver I use is python. But now, I faced a problem, that is: every time Selenium RC runs, and open a url, it opens 2 windows, one is for logging and the other one is for showing HTML content. But I can't close them all in script.
here's my script:
#!/usr/bin/env python
#-*-coding:utf-8-*-
from selenium import selenium
def main():
sel = selenium('localhost', 4444, '*firefox', 'http://www.sina.com.cn/')
sel.start()
try:
sel.open('http://www.sina.com.cn/')
except Exception, e:
print e
else:
print sel.get_title()
sel.close()
sel.stop()
if __name__ == '__main__':
main()
It's very easy to understand. What I really want is to close all windows that selenium opens. I've tried close() and stop(), but they all don't work.