diff --git a/tests/end2end/test_end2end.py b/tests/end2end/test_end2end.py index 6e30a98..2b175e7 100644 --- a/tests/end2end/test_end2end.py +++ b/tests/end2end/test_end2end.py @@ -13,6 +13,7 @@ import pytest from selenium.common.exceptions import TimeoutException +from selenium.webdriver.common.by import By import seleniumwire from seleniumwire import webdriver @@ -263,7 +264,7 @@ def interceptor(req): form = Path(__file__).parent / 'jsonform.html' driver.get(f'file:///{str(form)}') - button = driver.find_element_by_id('submit') + button = driver.find_element(By.ID, 'submit') button.click() # Makes Ajax request so need to wait for it request = driver.wait_for_request('/post')