Re: I stored data in a str, now i want to search it
Depending on how you obtained the data from your db, it might be in a collections object.
But you said it's in a string, so I'll take your word for it that you obtained it as a string.
Do you know the on-screen object that should contain your string?
Assuming you do, just use GetROProperty to compare the property (usually the "text" or "innertext" property depending on your app) to the string from your DB.
strOnScreenValue = Browser().Page().Object().GetROProperty ("text")
If strOnScreenValue = strDataBaseValue Then
Reporter.ReportEvent micPass, "String Compare", strOnScreenValue & " matches " & strDataBaseValue
Reporter.ReportEvent micFail, "String Compare", strOnScreenValue & " does not match " & strDataBaseValue
That comparison I used is case-sensitive. You might want to change them both to uppercase (Ucase), or maybe use Trim or Instr functions to make sure of the match - my solution was pretty basic.
If you don't know which object should contain your text, then you'll have to search for it one object at a time. There are posts on these forums that detail how to step through the child objects of a window or page, search for those if you need to.
(incidentally, I'm making a few assumptions here because your question didn't really give me the details to know for sure what you need - I hope I assumed correctly).
"The last 10% of any software project will take 90% of the budgeted time. The first 90% will take the other 90%"