Get element text can not match when object text contains html elements

Hello

I have a small issue when using Verify Element Text in my test case. The object of which i want to verify the text for contains a
and therefor i can not match the actual and expected values.

In short:
The web page shows:
String1
String2
By inspection (html):
String1
String2
Value property for the Verify Element Text (Expected):
‘String1
String2’
Actual value being matched:
String1
String2

Anyone have any tips/tricks or similar experience?
Thx

Hello,
when i check for text, i’m using verifyTextPresent() - i’m not searching in particular element
also verifyTextPresent() allows you to use regexp so it’s more flexible
unfortunately ‘matches’ from xpath does not work (there are few discussions on this around)

Hi Andrej

Thx for quick answer. Yes i know about verifyTextPresent(), but i do not want to check the whole page for a certain text, just the targeted object/element. Is there no way to verify object text when it contains newlines or similar html tags using verifyElementText()?

Thx

probably using getText() and compare with use of groovy

ok thank you!