Skip to content

Commit

Permalink
fix: Consider transient overlay windows when respectSystemAlerts is e…
Browse files Browse the repository at this point in the history
…nabled
  • Loading branch information
mwakizaka committed Oct 16, 2024
1 parent 5feb003 commit 00c4fa8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion WebDriverAgentLib/Routing/FBSession.m
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ - (XCUIApplication *)activeApplication
XCUIApplicationState testedAppState = self.testedApplication.state;
if (testedAppState >= XCUIApplicationStateRunningForeground) {
if ([FBConfiguration shouldRespectSystemAlerts]
&& [XCUIApplication.fb_systemApplication descendantsMatchingType:XCUIElementTypeAlert].count > 0) {
&& ([XCUIApplication.fb_systemApplication descendantsMatchingType:XCUIElementTypeAlert].count > 0
|| [XCUIApplication.fb_systemApplication fb_descendantsMatchingProperty:@"name" value:@"SBTransientOverlayWindow" partialSearch:false].count > 0)) {
return XCUIApplication.fb_systemApplication;
}
return (XCUIApplication *)self.testedApplication;
Expand Down

0 comments on commit 00c4fa8

Please sign in to comment.