{
let page = Aliases.VizGui.wndViz.TkChild.TkChild.TkChild.PeakOCSWnd;
Regions.Find(\"abc\",page)
Regions.FindRegion(\"ss\",page)
}
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)
}
Object = Aliases.VizGui.wndViz.TkChild.TkChild.TkChild.PeakOCSWnd; is an image.
\nss= it is the region i have created.
\n
Below code will help you compare the ss regions to get compare with the Object
Regions.Items(ss).Check(Object , false, false, 1, 1);
And what are your expectations?
\nWhat exactly does not work as you expected?
\nHave you read documentation for the method: https://support.smartbear.com/testcomplete/docs/reference/project-objects/items/stores/regions/find.html ?
\n","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"208","kudosSumWeight":1,"postTime":"2020-09-24T05:16:11.490-07:00","lastPublishTime":"2020-09-24T05:16:11.490-07:00","metrics":{"__typename":"MessageMetrics","views":1730},"visibilityScope":"PUBLIC","placeholder":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"entityType":"FORUM_REPLY","eventPath":"category:TestComplete_forum/community:nwkab66374board:testcomplete-questions/message:207650/message:207657","replies":{"__typename":"MessageConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[{"__typename":"MessageEdge","cursor":"MjUuM3wyLjF8b3wzfDE0OjAsMzk6MXwx","node":{"__ref":"ForumReplyMessage:message:207658"}}]},"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}}},"ModerationData:moderation_data:207658":{"__typename":"ModerationData","id":"moderation_data:207658","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":null},"ForumReplyMessage:message:207658":{"__typename":"ForumReplyMessage","uid":207658,"id":"message:207658","revisionNum":1,"author":{"__ref":"User:user:91711"},"readOnly":false,"repliesCount":2,"depth":3,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:testcomplete-questions"},"parent":{"__ref":"ForumReplyMessage:message:207657"},"conversation":{"__ref":"Conversation:conversation:207650"},"subject":"Re: Region.find is always returning true","moderationData":{"__ref":"ModerationData:moderation_data:207658"},"body":"
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.
","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"213","kudosSumWeight":0,"postTime":"2020-09-24T05:36:28.449-07:00","lastPublishTime":"2020-09-24T05:36:28.449-07:00","metrics":{"__typename":"MessageMetrics","views":1727},"visibilityScope":"PUBLIC","placeholder":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"entityType":"FORUM_REPLY","eventPath":"category:TestComplete_forum/community:nwkab66374board:testcomplete-questions/message:207650/message:207658","replies":{"__typename":"MessageConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[{"__typename":"MessageEdge","cursor":"MjUuM3wyLjF8b3wxfDE0OjAsMzk6MXwx","node":{"__ref":"ForumReplyMessage:message:207669"}}]},"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}}},"ModerationData:moderation_data:207669":{"__typename":"ModerationData","id":"moderation_data:207669","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":null},"ForumReplyMessage:message:207669":{"__typename":"ForumReplyMessage","author":{"__ref":"User:user:21756"},"id":"message:207669","revisionNum":1,"uid":207669,"depth":4,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:testcomplete-questions"},"parent":{"__ref":"ForumReplyMessage:message:207658"},"conversation":{"__ref":"Conversation:conversation:207650"},"subject":"Re: Region.find is always returning true","moderationData":{"__ref":"ModerationData:moderation_data:207669"},"body":"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.
\n","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"203","kudosSumWeight":1,"repliesCount":1,"postTime":"2020-09-24T09:34:37.704-07:00","lastPublishTime":"2020-09-24T09:34:37.704-07:00","metrics":{"__typename":"MessageMetrics","views":1714},"visibilityScope":"PUBLIC","placeholder":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"entityType":"FORUM_REPLY","eventPath":"category:TestComplete_forum/community:nwkab66374board:testcomplete-questions/message:207650/message:207669","customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}}}}}},"page":"/forums/ForumMessagePage/ForumMessagePage","query":{"boardId":"testcomplete-questions","messageSubject":"region-find-is-always-returning-true","messageId":"207650","replyId":"207656"},"buildId":"FP3zsFp6DJl70wDujOvtu","runtimeConfig":{"buildInformationVisible":false,"logLevelApp":"info","logLevelMetrics":"info","openTelemetryClientEnabled":false,"openTelemetryConfigName":"smartbear","openTelemetryServiceVersion":"25.3.0","openTelemetryUniverse":"prod","openTelemetryCollector":"http://localhost:4318","openTelemetryRouteChangeAllowedTime":"5000","apolloDevToolsEnabled":false,"inboxMuteWipFeatureEnabled":false},"isFallback":false,"isExperimentalCompile":false,"dynamicIds":["./components/seo/QAPageSchema/QAPageSchema.tsx","./components/community/Navbar/NavbarWidget.tsx","./components/community/Breadcrumb/BreadcrumbWidget.tsx","./components/messages/TopicWithThreadedReplyListWidget/TopicWithThreadedReplyListWidget.tsx","./components/messages/MessageView/MessageViewStandard/MessageViewStandard.tsx","./components/messages/MessageListForNodeByRecentActivityWidget/MessageListForNodeByRecentActivityWidget.tsx","./components/messages/RelatedContentWidget/RelatedContentWidget.tsx","./components/customComponent/CustomComponent/CustomComponent.tsx","../shared/client/components/common/List/UnstyledList/UnstyledList.tsx","./components/messages/MessageView/MessageView.tsx","./components/messages/MessageView/MessageViewInline/MessageViewInline.tsx","../shared/client/components/common/Pager/PagerLoadMore/PagerLoadMore.tsx","./components/customComponent/CustomComponentContent/TemplateContent.tsx"],"appGip":true,"scriptLoader":[]}