Well Di
Katalon Apprentice
06/07/2018

Text retrieved from page in Recorder and exported JUnit different (because of text-transform: upper)

I have a page that has menu that is shown as upper case only (using "text-transform: uppercase;", the actual text is mixed camel case).

In recorder if I verify that it compares to camel case and it works.

E.g.
verifyText link=Info Info

Exported to JUnit:
assertEquals("Info", driver.findElement(By.linkText("Info")).getText());

The webdriver will find the text by looking for the camel case, but the equals will fail because getText() will return all upper case.









Upvote
Quote
Sign In or Register to comment.