Micro Focus QTP (UFT) Forums

Full Version: Multiline text validaion
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,
i have a scenario like "i have to validate the multiline text message .it is displaying in a POP up".
please respond as early as possible.

Code:
myString1=Browser("Login").Dialog("Message from webpage").Static("objectName").GetROProperty("text")
'myString2="The selected XXX is not allowed to receive XXXXX materials."+Chr(13) & Chr(10)+"You can not proceed with this order using this XXXX"
if myString1=myString2 Then

msgbox "True"

End if
Thanks,
Murali.
Option 1:
Use the regular expression object to validate the content.
Option 2:
Define the "objectName" property with the expected text, and use the regular expression in the place of "X"s'. And then go with exist, if true pass else fail.

Option 2 is simple and easy.