Skip to content

Commit

Permalink
workaround for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bbonf committed Jun 11, 2024
1 parent fafd452 commit b30ba51
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion integration_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import django
import pytest
from seleniumbase.common.exceptions import NoSuchElementException

from lab_settings import EMAIL_FILE_PATH

Expand Down Expand Up @@ -146,7 +147,12 @@ def as_admin(sb, lab_app):
sb.type("#id_username", "admin")
sb.type("#id_password", "admin")
sb.click('button:contains("Log in")')
sb.click('button:contains("English")')
try:
sb.click('button:contains("English")')
except NoSuchElementException:
# ugly workaround for language setting
pass

sb.switch_to_default_driver()
return driver

Expand Down

0 comments on commit b30ba51

Please sign in to comment.