Hi All,
1.I have extracted the below message using Get Text activity and stored in variable “BatchTxT”
- Used Verify expression with Operator but the text is mismatched.
For more Details:
Hi All,
1.I have extracted the below message using Get Text activity and stored in variable “BatchTxT”
For more Details:
As per the screenshot we can see that there are extra double quotes in the given text…please check the same
Cheers
Its not the double quotes issue. please find the below screenshot. For passed data also it shows the same as below.
Got it…
If you check the first acreenshot you procided where it failed…the new line characters are diffrrent in both the texts…one in extracted one and one in the given one
In extracted nee line is \r\n and in given it is \n
Try comapring without newlines…or by replacing them
Cheers
How to remove new line from extracted text
Use batchTxt.Replace(Environment.NewLine,"")
If this does not work you can as well try batchTxt.Replace("\r\n","\n")
Or we can use regex and replce all the space related charqcters and then compare
System.Text.RegularExpressions.Regex.Replace(batchTxt,"\s","")
Cheers
@Anil_G
I got below value when used System.Text.RegularExpressions.Regex.Replace(BatchTxT,“\s”,“”)
“10Theselectedlotisreserved.Pleaseselectanotherlot”
How to convert to “10 The selected lot is reserved. Please select another lot”
The purpose of \s is to remove any kind of spaces…on the right verification as well use similar expression or remove all the spaces and compare the data
Or if you want to replace only newine characters then use this regex and try "\r?\n"
Cheers
Thank You