appium-webdriveragent 7.1.0 → 7.1.2

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,17 @@
1
+ ## [7.1.2](https://github.com/appium/WebDriverAgent/compare/v7.1.1...v7.1.2) (2024-03-14)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Always assume en0 is the WiFi interface ([#864](https://github.com/appium/WebDriverAgent/issues/864)) ([6dbfb3f](https://github.com/appium/WebDriverAgent/commit/6dbfb3f2ec8e0bfa5a42c6f8ab882893bfe3f534))
7
+
8
+ ## [7.1.1](https://github.com/appium/WebDriverAgent/compare/v7.1.0...v7.1.1) (2024-03-13)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * respect defaultActiveApplication in activeApplication selection ([#862](https://github.com/appium/WebDriverAgent/issues/862)) ([b1ddae2](https://github.com/appium/WebDriverAgent/commit/b1ddae2be3fd3f7c87de79e804d82cf7c13dc56e))
14
+
1
15
  ## [7.1.0](https://github.com/appium/WebDriverAgent/compare/v7.0.6...v7.1.0) (2024-03-07)
2
16
 
3
17
 
@@ -70,7 +70,7 @@ typedef NS_ENUM(NSUInteger, FBUIInterfaceAppearance) {
70
70
  - (nullable NSData *)fb_screenshotWithError:(NSError*__autoreleasing*)error;
71
71
 
72
72
  /**
73
- Returns device current wifi ip4 address
73
+ Returns device's current wifi ip4 address
74
74
  */
75
75
  - (nullable NSString *)fb_wifiIPAddress;
76
76
 
@@ -134,7 +134,7 @@ static bool fb_isLocked;
134
134
  continue;
135
135
  }
136
136
  NSString *interfaceName = [NSString stringWithUTF8String:temp_addr->ifa_name];
137
- if(![interfaceName containsString:@"en"]) {
137
+ if(![interfaceName isEqualToString:@"en0"]) {
138
138
  temp_addr = temp_addr->ifa_next;
139
139
  continue;
140
140
  }
@@ -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.2",
4
4
  "description": "Package bundling WebDriverAgent",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {