Created
March 25, 2016 16:26
-
-
Save wehappyfew/93469b63a6088acc305b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
elif environment == "docker": | |
# Docker Hub setup: hub_ip="http://172.17.0.3", hub_port=4444 | |
def setUp(self, hub_ip="http://172.17.0.3", hub_port=4444): | |
print "--Fixtures_docker in config.py trying to run on--: %s:%s"%(hub_ip, hub_port) | |
if platform.system() == 'Linux': | |
from pyvirtualdisplay import Display | |
self.display = Display(visible=0, size=(1024, 768)) | |
self.display.start() | |
if browser == "Firefox": # Runs on Linux & Windows | |
self.wd = webdriver.Remote( | |
command_executor=hub_ip + ':' + str(hub_port) + '/wd/hub', | |
desired_capabilities={ | |
#FIREFOX | |
"browserName" : "firefox", | |
#"maxInstances" : 2, | |
"seleniumProtocol": "WebDriver", | |
"platform" : "ANY", | |
"node" : hub_port | |
}) | |
self.wd.implicitly_wait(10) | |
def tearDown(self): | |
self.wd.quit() | |
if platform.system() == 'Linux': | |
self.display.stop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment