Skip to content

Commit

Permalink
[py] fix broken syntax in mutation events
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Jun 7, 2023
1 parent 5af3b2d commit 4e77ade
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion py/selenium/webdriver/common/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async def mutation_events(self) -> dict:
yield event

payload = json.loads(evnt.value.payload)
elements: list = self.driver.find_elements(By.CSS_SELECTOR, f"*[data-__webdriver_id={payload['target']}")
elements: list = self.driver.find_elements(By.CSS_SELECTOR, f"*[data-__webdriver_id={payload['target']}]")
if not elements:
elements.append(None)
event["element"] = elements[0]
Expand Down
2 changes: 1 addition & 1 deletion py/test/selenium/webdriver/common/bidi_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async def test_collect_log_mutations(driver, pages):
async with log.mutation_events() as event:
pages.load("dynamic.html")
driver.find_element(By.ID, "reveal").click()
WebDriverWait(driver, 5, ignored_exceptions=InvalidSelectorException).until(
WebDriverWait(driver, 5).until(
EC.visibility_of(driver.find_element(By.ID, "revealed"))
)

Expand Down

0 comments on commit 4e77ade

Please sign in to comment.