Skip to content

Commit

Permalink
[py] Add unicode tests for getAttributes
Browse files Browse the repository at this point in the history
  • Loading branch information
AutomatedTester committed Nov 26, 2020
1 parent 18192ea commit da53187
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions common/src/web/attributes.html
@@ -0,0 +1 @@
<li value="4b273a33fbbd29013nN93dy4F1A~" class="cur"></li>
15 changes: 14 additions & 1 deletion py/test/selenium/webdriver/common/element_attribute_tests.py
Expand Up @@ -268,7 +268,20 @@ def testShouldReturnTrueForPresentBooleanAttributes(driver, pages):
assert "true" == element4.get_attribute("required")


def tesShouldGetUnicodeCharsFromAttribute(driver, pages):
@pytest.mark.xfail_chrome
@pytest.mark.xfail_firefox
@pytest.mark.xfail_safari
def testShouldGetUnicodeCharsFromAttribute(driver, pages):
pages.load("formPage.html")
title = driver.find_element(By.ID, "vsearchGadget").get_attribute("title")
assert 'Hvad s\xf8ger du?' == title


@pytest.mark.xfail_chrome
@pytest.mark.xfail_firefox
@pytest.mark.xfail_safari
def testShouldGetValuesAndNotMissItems(driver, pages):
pages.load("attributes.html")
expected = "4b273a33fbbd29013nN93dy4F1A~"
result = driver.find_element(By.CSS_SELECTOR, "li").get_attribute("value")
assert expected == result

0 comments on commit da53187

Please sign in to comment.