Skip to content

Commit

Permalink
[py] fix tests in correct_event_firing_tests.py (#14510)
Browse files Browse the repository at this point in the history
[py] fix todo tests in `correct_event_firing_tests.py`

Co-authored-by: Sri Harsha <[email protected]>
  • Loading branch information
navin772 and harsha509 authored Sep 17, 2024
1 parent f666c7f commit 6dd13d7
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions py/test/selenium/webdriver/common/correct_event_firing_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,21 +111,20 @@ def test_clearing_an_element_should_cause_the_on_change_handler_to_fire(driver,
assert result.text == "Cleared"


# TODO Currently Failing and needs fixing
# def test_sending_keys_to_another_element_should_cause_the_blur_event_to_fire(driver, pages):
# pages.load("javascriptPage.html")
# element = driver.find_element(By.ID, "theworks")
# element.send_keys("foo")
# element2 = driver.find_element(By.ID, "changeable")
# element2.send_keys("bar")
# _assertEventFired(driver, "blur")

# TODO Currently Failing and needs fixing
# def test_sending_keys_to_an_element_should_cause_the_focus_event_to_fire(driver, pages):
# pages.load("javascriptPage.html")
# element = driver.find_element(By.ID, "theworks")
# element.send_keys("foo")
# _assertEventFired(driver, "focus")
def test_sending_keys_to_another_element_should_cause_the_blur_event_to_fire(driver, pages):
pages.load("javascriptPage.html")
element = driver.find_element(By.ID, "theworks")
element.send_keys("foo")
element2 = driver.find_element(By.ID, "changeable")
element2.send_keys("bar")
_assert_event_fired(driver, "blur")


def test_sending_keys_to_an_element_should_cause_the_focus_event_to_fire(driver, pages):
pages.load("javascriptPage.html")
element = driver.find_element(By.ID, "theworks")
element.send_keys("foo")
_assert_event_fired(driver, "focus")


def _click_on_element_which_records_events(driver):
Expand Down

0 comments on commit 6dd13d7

Please sign in to comment.