Forum Discussion
This is the code snippet i am using for a POC purpose
function Test()
{
let page = Aliases.VizGui.wndViz.TkChild.TkChild.TkChild.PeakOCSWnd;
Regions.Find("abc",page)
Regions.FindRegion("ss",page)
}
And what are your expectations?
What exactly does not work as you expected?
Have you read documentation for the method: https://support.smartbear.com/testcomplete/docs/reference/project-objects/items/stores/regions/find.html ?
- shubham15 years agoOccasional Contributor
I want to validate that in a given object(which is an image) the stored region is present or not.
Object = Aliases.VizGui.wndViz.TkChild.TkChild.TkChild.PeakOCSWnd; is an image.
ss= it is the region i have created.
i want to find "ss"(Region) in object.
- AlexKaras5 years ago
Champion Level 2
That's fine. As per documentation, the result of .Find() is either null or coordinates of the found region within the image. Your sample code just calls .Find(). That is why I wondered about your expectations from code execution and provided a link to the documentation with description and code sample.
- shubham15 years agoOccasional Contributor
If is it not "null " that means testComplete has find the image inside another image. While I know for the fact by seeing both the images that the result should be null.
that is the query i am asking, how to validate whether .Find method is able to find the region or not