Hii Team,
We are extracting String
ValueExtracted=“Found 0 items”
Example if given as below
Found 0 items
Then it should be True
Else
False
Have tried approach using keyword with Contain
But then if string would be
“Found 100 items” then also it returns true which is incorrect
It should only be true if 0 items are there
Thanks team in Advance
Hi!
Why don’t you just use ValueExtracted.Equals(“Found 0 items”) ?
mkankatala
(Mahesh Kankatala)
3
Hi @NISHITHA
You can use the below expression to get the True or False,
- Assign -> Input = "Found 0 items"
- Assign -> Bool_Flag = If(Input.toString.tolower.equals("found 0 items"), True, False)
Bool_Flag is the boolean datatype variable which gives if Found 0 items then it will give True else False.
Check the below image for better understanding,
Hope it helps!!
singh_sumit
(Sumit Singh Tariyal)
5
Hie @NISHITHA you can use if condition and inside if pass your variable if it equals then it true otherwise it goes false

cheers Happy Automation. 
Another way is to use regex to remove all other than numbers.
System.Text.RegularExpressions.Regex.Replace(string_Variable,“\D”,“”)
The advantage is that you are not affected if the text changes
Example from “Found 0 items” to
- “Found 0 products”
- “Found 0 results”
- “Found 0 entries”
- “Found 0 records”
system
(system)
Closed
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.