Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update visibility_tests.py to verify that "_" is not overwritten when calling "is_displayed()" #12705

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions py/test/selenium/webdriver/common/visibility_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,17 @@ def test_should_say_element_with_zero_transform_is_visible(driver, pages):
assert zero_tranform.is_displayed() is True


def test_checking_for_visibility_does_not_overwrite_underscore(driver, pages):
pages.load("cssTransform.html")
driver.execute_script("_ = 'abc123';")
zero_tranform = driver.find_element(By.ID, "zero-tranform")
underscore_1 = driver.execute_script("return _;")
zero_tranform.is_displayed()
underscore_2 = driver.execute_script("return _;")
assert underscore_1 == underscore_2
assert underscore_2 == "abc123"


def test_should_say_element_is_visible_when_it_has_negative_transform_but_elementisnt_in_anegative_space(driver, pages):
pages.load("cssTransform2.html")
zero_tranform = driver.find_element(By.ID, "negative-percentage-transformY")
Expand Down
Loading