diff --git a/CHANGELOG.md b/CHANGELOG.md index d5321867bb..998e594301 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [7.0.1](https://github.com/appium/WebDriverAgent/compare/v7.0.0...v7.0.1) (2024-02-21) + + +### Miscellaneous Chores + +* Simplify the logic of alert element detection ([#851](https://github.com/appium/WebDriverAgent/issues/851)) ([54f91f1](https://github.com/appium/WebDriverAgent/commit/54f91f198e45535ea9d86b7eee40b21f43f84294)) + ## [7.0.0](https://github.com/appium/WebDriverAgent/compare/v6.1.1...v7.0.0) (2024-02-12) diff --git a/WebDriverAgentLib/FBAlert.m b/WebDriverAgentLib/FBAlert.m index 0709e5f1f3..cd71663ddc 100644 --- a/WebDriverAgentLib/FBAlert.m +++ b/WebDriverAgentLib/FBAlert.m @@ -261,16 +261,7 @@ - (BOOL)clickAlertButton:(NSString *)label error:(NSError **)error - (XCUIElement *)alertElement { if (nil == self.element) { - self.element = self.application.fb_alertElement; - if (nil == self.element) { - XCUIApplication *systemApp = XCUIApplication.fb_systemApplication; - for (XCUIApplication *activeApp in XCUIApplication.fb_activeApplications) { - if (systemApp.processID == activeApp.processID) { - self.element = activeApp.fb_alertElement; - break; - } - } - } + self.element = XCUIApplication.fb_systemApplication.fb_alertElement ?: self.application.fb_alertElement; } return self.element; } diff --git a/package.json b/package.json index 928745924e..022389e50e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "appium-webdriveragent", - "version": "7.0.0", + "version": "7.0.1", "description": "Package bundling WebDriverAgent", "main": "./build/index.js", "scripts": {