def test_ie_driver_binary(version, use_cache):
    delete_old_install()
    ie_driver = IEDriver(version, "win32")
    if use_cache:
        cache.download_driver(ie_driver)
    ie_driver_bin = cache.download_driver(ie_driver)
    assert ie_driver_bin.name == u'IEDriverServer'
    assert os.path.exists(ie_driver_bin.path)
Beispiel #2
0
def test_gecko_driver_with_wrong_token():
    old_token = os.getenv("GH_TOKEN", "default")
    os.environ["GH_TOKEN"] = "aaa"
    with pytest.raises(ValueError) as ex:
        driver = GeckoDriver(version="latest",
                             os_type="linux32")
        cache.download_driver(driver)
    assert ex.value.args[0]['message'] == "Bad credentials"
    os.environ["GH_TOKEN"] = old_token
Beispiel #3
0
def test_gecko_driver_with_wrong_token():
    with pytest.raises(ValueError) as ex:
        driver = GeckoDriver(version="latest", os_type="linux32")
        driver.config.set("gh_token", "adasda")
        cache.download_driver(driver)
    assert ex.value.args[0]['message'] == "Bad credentials"