var str1 = “Dimension Data”
var str2 = “Data planet”
I want to compare the above strings and set the condition to true even(as the word data is present in both the strings) if part of the string is matching. Could you please let me know how can this be done?
Output must be true even if part of the string is matches.
if you want to just check weather both variables have the word data you can use if
str1.ToString.ToLower.Contains(“data”) and str2.ToString.ToLower.Contains(“data”)
if there are multiple words in your string then use split string then loop the array one by one check Str2.ToString.Contains(ArryElement)
Here you have to remember the logic first Frame idx=49 Increment 8 for 2nd frame increment 8 for 3rd frame.
for each 4th frame you have to increment 8+1.
So idx values will be like this: idx=49, 57, 65 74,82, 90, 99…etc (1,2,3,4,5,6,7…etc )
once you loop with this logic in get text activity then you can get all text information in a string(image will be ignored). Once you get the string value then you can do string manipulations.
@rkelchuri Thank you but still not clear. why idx 8 needs to incremented to get the second listed food item. My selector shows idx as 1 using IE for the first frame.
I have used Google Chrome Browser. When you spy on the web elements with UiExplorer then you can see consistent increment on the idx value… to grab specific area of frame.
Why we need to select specific frame instead of specific text.
You have to see consistent property where it should not change while loading. So, each time we have to collect only specific constant or stable property. This will never change. also it will increase and decrease depends on size of the data. so, every iteration we can get accurate text from the specific frame area.
@rkelchuri Thank you. It is really helpful. I am just trying out and also put counter value but only one food item lists when i run the file. Used find children activity.