Skip to content
This repository has been archived by the owner on Dec 26, 2019. It is now read-only.

Commit

Permalink
Fix landscape hitpoint checking
Browse files Browse the repository at this point in the history
Summary: It appears that hitpoint is also not transformed in repsect to window's orientation so we can compare it directly with App's frame

Reviewed By: lawrencelomax

Differential Revision: D4779067

fbshipit-source-id: 80caa273c24025b9eddcbfd9f3e7008707e00a78
  • Loading branch information
Marek Cirkos authored and facebook-github-bot committed Mar 27, 2017
1 parent b8de92c commit 7d2896e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion WebDriverAgentLib/Categories/XCUIElement+FBIsVisible.m
Expand Up @@ -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;
}

Expand Down

0 comments on commit 7d2896e

Please sign in to comment.