Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
Use By locator in test instead of deprecated/removed long lookup me…
Browse files Browse the repository at this point in the history
…thod
  • Loading branch information
sterliakov committed Jul 5, 2022
1 parent c7ed400 commit 8054f65
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/end2end/test_end2end.py
Expand Up @@ -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
Expand Down Expand Up @@ -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')

Expand Down

0 comments on commit 8054f65

Please sign in to comment.