def test_parse_desired_capabilities(self): env = helpers.get_remote_env( options=dict( desired_capabilities='browserName=firefox,platform=ANY', ), ) self.assertEquals(dict(browserName='firefox', platform='ANY'), env.get_desired_capabilities())
def test_remote_env_default_server_custom(self): env = helpers.get_remote_env( server_options=dict( port=1234, ) ) self.assertEquals('http://127.0.0.1:1234/wd/hub', env.get_command_executor()) self.assertEquals(None, env.get_desired_capabilities())
def test_remote_env_custom_server_custom(self): env = helpers.get_remote_env( options=dict( command_executor='http://127.0.0.1:1234/wd/hub', desired_capabilities='opera', ), server_options=dict( port=5678, ) ) self.assertEquals('http://127.0.0.1:1234/wd/hub', env.get_command_executor()) self.assertEquals(DesiredCapabilities.OPERA, env.get_desired_capabilities())
def test_remote_env_default_server_default(self): env = helpers.get_remote_env() self.assertEquals('http://127.0.0.1:4444/wd/hub', env.get_command_executor()) self.assertEquals(None, env.get_desired_capabilities())