-
-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Feature: finding EdgeDriver version for MAC & LINUX depends on MSEdge browser version and OS type (Closes #243, #242) - Fix: Add rights to execute edgedriver binary on linux. - Test Coverage: More tests for EdgeDriver & testing on LINUX/MAC in CI. - bump version to 3.5.2 - delete requirements.txt
- Loading branch information
1 parent
007efd8
commit 5fa1f03
Showing
10 changed files
with
91 additions
and
65 deletions.
There are no files selected for viewing
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
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[bumpversion] | ||
current_version = 3.5.1 | ||
current_version = 3.5.2 | ||
commit = True | ||
tag = True | ||
|
||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,53 @@ | ||
import os | ||
|
||
import pytest | ||
from selenium import webdriver | ||
|
||
from webdriver_manager.microsoft import EdgeChromiumDriverManager | ||
from webdriver_manager.utils import os_name, os_type | ||
|
||
|
||
# TODO: set 'if os_name() != 'linux': | ||
# when edge > 82 is installed on mac os worker | ||
def test_edge_manager_with_selenium(): | ||
if os_name() == 'win': | ||
driver_path = EdgeChromiumDriverManager(os_type=os_type()).install() | ||
driver = webdriver.Edge(executable_path=driver_path) | ||
driver.get("http://automation-remarks.com") | ||
driver.quit() | ||
else: | ||
driver_path = EdgeChromiumDriverManager(os_type="win32").install() | ||
assert os.path.exists(driver_path) | ||
driver_path = EdgeChromiumDriverManager().install() | ||
|
||
driver = webdriver.Edge(executable_path=driver_path, capabilities={}) | ||
|
||
driver.get("http://automation-remarks.com") | ||
driver.quit() | ||
|
||
|
||
def test_edge_manager_with_wrong_version(): | ||
with pytest.raises(ValueError) as ex: | ||
driver_path = EdgeChromiumDriverManager("0.2", | ||
os_type='win64').install() | ||
driver_path = EdgeChromiumDriverManager( | ||
version="0.2", | ||
os_type='win64', | ||
).install() | ||
driver = webdriver.Edge(executable_path=driver_path) | ||
driver.quit() | ||
assert "There is no such driver by url "\ | ||
"https://msedgedriver.azureedge.net/0.2/edgedriver_win64.zip" in \ | ||
ex.value.args[0] | ||
|
||
assert ( | ||
"There is no such driver by url " | ||
"https://msedgedriver.azureedge.net/0.2/edgedriver_win64.zip" | ||
) in ex.value.args[0] | ||
|
||
|
||
# TODO: add "mac64" when https://msedgedriver.azureedge.net/LATEST_STABLE | ||
# return edgedriver > 82 | ||
# see: | ||
# https://msedgewebdriverstorage.z22.web.core.windows.net/?prefix=82.0.418.0/ | ||
@pytest.mark.parametrize('os_type', ['win32', 'win64']) | ||
@pytest.mark.parametrize('os_type', ['win32', 'win64', 'linux64', 'mac64']) | ||
def test_can_download_edge_driver(os_type): | ||
path = EdgeChromiumDriverManager(os_type=os_type).install() | ||
assert os.path.exists(path) | ||
|
||
|
||
# TODO: add "mac64" when https://msedgedriver.azureedge.net/LATEST_STABLE | ||
# return edgedriver > 82 | ||
# see: | ||
# https://msedgewebdriverstorage.z22.web.core.windows.net/?prefix=82.0.418.0/ | ||
@pytest.mark.parametrize('os_type', ['win32', 'win64']) | ||
@pytest.mark.parametrize('os_type', ['win32', 'win64', 'mac64', 'linux64']) | ||
def test_can_get_edge_driver_from_cache(os_type): | ||
EdgeChromiumDriverManager(os_type=os_type).install() | ||
driver_path = EdgeChromiumDriverManager(os_type=os_type).install() | ||
assert os.path.exists(driver_path) | ||
|
||
|
||
def test_edge_with_specific_version(): | ||
bin_path = EdgeChromiumDriverManager("77.0.189.3", | ||
os_type='win64').install() | ||
@pytest.mark.parametrize('os_type', ['win32', 'win64', 'mac64', 'linux64']) | ||
@pytest.mark.parametrize('specific_version', ['86.0.600.0']) | ||
def test_edge_with_specific_version(os_type, specific_version): | ||
bin_path = EdgeChromiumDriverManager( | ||
version=specific_version, | ||
os_type=os_type, | ||
).install() | ||
assert os.path.exists(bin_path) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '3.5.1' | ||
__version__ = '3.5.2' |
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
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
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