问题
Is there a way to run Selenium test in offline mode? If I set the offline mode in the firefox profile, selenium is stuck at selenium.start(). I'm using the python client driver. The code is as below
sel = selenium('localhost', 4444, '*firefox', 'file:///home/user/selenium/selenium-python/client-driver-1.0.1/inputs/input.html')
sel.start()
sel.open('file:///home/user/selenium/selenium-python/client-driver-1.0.1/inputs/input.html')
回答1:
The following description in a blog helped me to fix the same problem, but using selenium with java junit tests.
Without knowing to much about running selenium from python, I do not see where you are starting the selenium RC server with the firefox profile.
i.e
java -jar selenium-server.jar -firefoxProfileTemplate “”
来源:https://stackoverflow.com/questions/3155140/running-selenium-rc-tests-in-firefox-in-offline-mode