Edge driver returns an original text format for a transformed

External Issue #7783166

Details

Author
Dmitry R.
Created
Jun 3, 2016
Privacy
This issue is public.
Found in
  • Microsoft Edge
Reports
Reported by 5 people

Sign in to watch or report this issue.

Steps to reproduce

OS: Any
Selenium Version: 2.53
Browser: EDGE only
Browser Version: 13

Expected Behavior:
Should return text in the way how it is visible to user which is common behavior.

Actual Behavior:
Returns non transformed text

Steps to reproduce:
For <span style="text-transform: uppercase;">text</span> markup
WebElement.text method returns “text”


import unittest
from selenium import webdriver


EDGE_SAUCELABS_CAPS = {
    "browserName": "MicrosoftEdge",
    "platform": "Windows 10",
    "version": "13.10586"
}
URL = "http://www.w3schools.com/cssref/playit.asp?filename=playcss_text-transform"
REMOTE_URL = "http://user_name:user_key@ondemand.saucelabs.com:80/wd/hub"


class TestTransformUppercase(unittest.TestCase):
    def setUp(self):
        #self.driver = webdriver.Firefox()
        self.driver = webdriver.Remote(REMOTE_URL, EDGE_SAUCELABS_CAPS)
        self.driver.get(URL)

    def test_should_return_uppercase_text(self):
        self.driver.find_element_by_css_selector(
            ".radio input[value='uppercase']").click()
        self.assertEqual(
            "THIS EXAMPLE DEMONSTRATES DIFFERENT TEXT-TRANSFORMS.", self.get_text()
            )

    def test_should_return_return_normalcase_text(self):
        self.assertEqual(
            "This example demonstrates different text-transforms.", self.get_text()
            )

    def get_text(self):
        return self.driver.find_element_by_css_selector("#demoParent p").text

    def tearDown(self):
        self.driver.quit()

if __name__ == "__main__":
    unittest.main()

These tests pass in IE10, FF, Chrome
But fail in EDGE

dm08@dm08:~$ python  transformation.py 
FF
======================================================================
FAIL: test_should_return_return_normalcase_text (__main__.TestTransformUppercase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "transformation.py", line 35, in test_should_return_return_normalcase_text
    "This example demonstrates different text-transforms.", self.get_text()
AssertionError: 'This example demonstrates different text-transforms.' != u'This example demonstrates different text-transforms. '

======================================================================
FAIL: test_should_return_uppercase_text (__main__.TestTransformUppercase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "transformation.py", line 30, in test_should_return_uppercase_text
    "THIS EXAMPLE DEMONSTRATES DIFFERENT TEXT-TRANSFORMS.", self.get_text()
AssertionError: 'THIS EXAMPLE DEMONSTRATES DIFFERENT TEXT-TRANSFORMS.' != u'This example demonstrates different text-transforms. '

----------------------------------------------------------------------
Ran 2 tests in 24.642s

FAILED (failures=2)

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Ibrahim O.”

      Changed Assigned To to “Mara P.”

      Changed Status to “External”

    • This bug has marked as duplicate. Please follow the [parent issue]((…/5932257/) to get new updates.

    You need to sign in to your Microsoft account to add a comment.

    Sign in