diff --git a/WebDriverAgentLib/Categories/XCUIElement+FBIsVisible.m b/WebDriverAgentLib/Categories/XCUIElement+FBIsVisible.m index ef2a370fd..0cecacb88 100644 --- a/WebDriverAgentLib/Categories/XCUIElement+FBIsVisible.m +++ b/WebDriverAgentLib/Categories/XCUIElement+FBIsVisible.m @@ -43,7 +43,7 @@ - (BOOL)fb_isVisible CGSize screenSize = FBAdjustDimensionsForApplication(app.frame.size, (UIInterfaceOrientation)[XCUIDevice sharedDevice].orientation); CGRect screenFrame = CGRectMake(0, 0, screenSize.width, screenSize.height); BOOL rectIntersects = CGRectIntersectsRect(self.visibleFrame, screenFrame); - BOOL isActionable = CGRectContainsPoint(screenFrame, self.hitPoint); + BOOL isActionable = CGRectContainsPoint(app.frame, self.hitPoint); return rectIntersects && isActionable; }