Update web-platform-tests to revision 7123012427f92f0dc38a120e6e86a75b6c03aab5

This commit is contained in:
Ms2ger 2015-10-31 14:26:53 +01:00
parent 912359fcbd
commit b492a3e8b1
45 changed files with 688 additions and 232 deletions

View file

@ -10,7 +10,7 @@ repo_root = os.path.abspath(os.path.join(__file__, "../.."))
sys.path.insert(1, os.path.join(repo_root, "tools", "webdriver"))
sys.path.insert(1, os.path.join(repo_root, "tools", "wptserve"))
from wptserve import server
from webdriver.driver import WebDriver
from selenium import webdriver
class WebDriverBaseTest(unittest.TestCase):
@ -33,9 +33,10 @@ def create_driver():
config = ConfigParser.ConfigParser()
config.read('webdriver.cfg')
section = os.environ.get("WD_BROWSER", 'firefox')
url = 'http://127.0.0.1:4444/wd/hub'
if config.has_option(section, 'url'):
url = config.get(section, "url")
else:
url = 'http://127.0.0.1:4444/wd/hub'
capabilities = None
if config.has_option(section, 'capabilities'):
try:
@ -45,5 +46,15 @@ def create_driver():
mode = 'compatibility'
if config.has_option(section, 'mode'):
mode = config.get(section, 'mode')
if section == 'firefox':
driver = webdriver.Firefox()
elif section == 'chrome':
driver = webdriver.Chrome()
elif section == 'edge':
driver = webdriver.Remote()
elif section == 'ie':
driver = webdriver.Ie()
elif section == 'selendroid':
driver = webdriver.Android()
return WebDriver(url, {}, capabilities, mode)
return driver