appium-webdriveragent 7.1.0 → 7.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [7.1.1](https://github.com/appium/WebDriverAgent/compare/v7.1.0...v7.1.1) (2024-03-13)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * respect defaultActiveApplication in activeApplication selection ([#862](https://github.com/appium/WebDriverAgent/issues/862)) ([b1ddae2](https://github.com/appium/WebDriverAgent/commit/b1ddae2be3fd3f7c87de79e804d82cf7c13dc56e))
7
+
1
8
  ## [7.1.0](https://github.com/appium/WebDriverAgent/compare/v7.0.6...v7.1.0) (2024-03-07)
2
9
 
3
10
 
@@ -166,6 +166,13 @@ static FBSession *_activeSession = nil;
166
166
 
167
167
  - (XCUIApplication *)activeApplication
168
168
  {
169
+ BOOL isAuto = [self.defaultActiveApplication isEqualToString:FBDefaultApplicationAuto];
170
+ NSString *defaultBundleId = isAuto ? nil : self.defaultActiveApplication;
171
+
172
+ if (nil != defaultBundleId && [self applicationStateWithBundleId:defaultBundleId] >= XCUIApplicationStateRunningForeground) {
173
+ return [self makeApplicationWithBundleId:defaultBundleId];
174
+ }
175
+
169
176
  if (nil != self.testedApplication) {
170
177
  XCUIApplicationState testedAppState = self.testedApplication.state;
171
178
  if (testedAppState >= XCUIApplicationStateRunningForeground) {
@@ -177,9 +184,6 @@ static FBSession *_activeSession = nil;
177
184
  }
178
185
  }
179
186
 
180
- NSString *defaultBundleId = [self.defaultActiveApplication isEqualToString:FBDefaultApplicationAuto]
181
- ? nil
182
- : self.defaultActiveApplication;
183
187
  return [XCUIApplication fb_activeApplicationWithDefaultBundleId:defaultBundleId];
184
188
  }
185
189
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appium-webdriveragent",
3
- "version": "7.1.0",
3
+ "version": "7.1.1",
4
4
  "description": "Package bundling WebDriverAgent",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {