Skip to content

Commit 24c2c4f

Browse files
committed
[py] set a default value for driver in test suite
1 parent 6cce0c9 commit 24c2c4f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

py/conftest.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,8 @@ def pytest_ignore_collect(path, config):
9292
def driver(request):
9393
kwargs = {}
9494

95-
try:
96-
driver_class = request.param.capitalize()
97-
except AttributeError:
98-
raise Exception("This test requires a --driver to be specified.")
95+
# browser can be changed with `--driver=firefox` as an argument or in pytest.ini
96+
driver_class = request.param.capitalize() if request.param else "Chrome"
9997

10098
# skip tests if not available on the platform
10199
_platform = platform.system()

0 commit comments

Comments
 (0)