appium-webdriveragent 8.8.0 → 8.9.0

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,13 @@
1
+ ## [8.9.0](https://github.com/appium/WebDriverAgent/compare/v8.8.0...v8.9.0) (2024-08-07)
2
+
3
+ ### Features
4
+
5
+ * Add idleTimeoutMs param to the openUrl call ([#933](https://github.com/appium/WebDriverAgent/issues/933)) ([5e98841](https://github.com/appium/WebDriverAgent/commit/5e98841f56eda6454d67d813b921bfcf98f1ff78))
6
+
7
+ ### Bug Fixes
8
+
9
+ * Revert the logic to open the default URL in Safari via deeplink ([#932](https://github.com/appium/WebDriverAgent/issues/932)) ([7c51145](https://github.com/appium/WebDriverAgent/commit/7c5114518509c9a399845283eca7708248fb838f))
10
+
1
11
  ## [8.8.0](https://github.com/appium/WebDriverAgent/compare/v8.7.12...v8.8.0) (2024-08-06)
2
12
 
3
13
  ### Features
@@ -421,10 +421,6 @@
421
421
  7182276E258744C900661B83 /* HTTPErrorResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = E444DC59249131880060D7EB /* HTTPErrorResponse.h */; };
422
422
  71822777258744CE00661B83 /* DDNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = E444DC7D249131B00060D7EB /* DDNumber.h */; };
423
423
  71822780258744D000661B83 /* DDRange.h in Headers */ = {isa = PBXBuildFile; fileRef = E444DC7B249131B00060D7EB /* DDRange.h */; };
424
- 718D2C122C60BAE3000788F2 /* FBWebServerParams.m in Sources */ = {isa = PBXBuildFile; fileRef = 718D2C112C60BAE3000788F2 /* FBWebServerParams.m */; };
425
- 718D2C132C60BAE3000788F2 /* FBWebServerParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 718D2C102C60BAE3000788F2 /* FBWebServerParams.h */; };
426
- 718D2C142C60BAE3000788F2 /* FBWebServerParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 718D2C102C60BAE3000788F2 /* FBWebServerParams.h */; };
427
- 718D2C152C60BAE3000788F2 /* FBWebServerParams.m in Sources */ = {isa = PBXBuildFile; fileRef = 718D2C112C60BAE3000788F2 /* FBWebServerParams.m */; };
428
424
  718F49C8230844330045FE8B /* FBProtocolHelpersTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 718F49C7230844330045FE8B /* FBProtocolHelpersTests.m */; };
429
425
  718F49C923087ACF0045FE8B /* FBProtocolHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 71B155DD23080CA600646AFB /* FBProtocolHelpers.h */; };
430
426
  718F49CA23087AD30045FE8B /* FBProtocolHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 71B155DE23080CA600646AFB /* FBProtocolHelpers.m */; };
@@ -1031,8 +1027,6 @@
1031
1027
  718226C72587443600661B83 /* GCDAsyncSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GCDAsyncSocket.h; path = WebDriverAgentLib/Vendor/CocoaAsyncSocket/GCDAsyncSocket.h; sourceTree = SOURCE_ROOT; };
1032
1028
  718226C82587443600661B83 /* GCDAsyncSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GCDAsyncSocket.m; path = WebDriverAgentLib/Vendor/CocoaAsyncSocket/GCDAsyncSocket.m; sourceTree = SOURCE_ROOT; };
1033
1029
  718226C92587443600661B83 /* GCDAsyncUdpSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GCDAsyncUdpSocket.m; path = WebDriverAgentLib/Vendor/CocoaAsyncSocket/GCDAsyncUdpSocket.m; sourceTree = SOURCE_ROOT; };
1034
- 718D2C102C60BAE3000788F2 /* FBWebServerParams.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FBWebServerParams.h; sourceTree = "<group>"; };
1035
- 718D2C112C60BAE3000788F2 /* FBWebServerParams.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FBWebServerParams.m; sourceTree = "<group>"; };
1036
1030
  718F49C7230844330045FE8B /* FBProtocolHelpersTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FBProtocolHelpersTests.m; sourceTree = "<group>"; };
1037
1031
  71930C4020662E1F00D3AFEC /* FBPasteboard.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FBPasteboard.h; sourceTree = "<group>"; };
1038
1032
  71930C4120662E1F00D3AFEC /* FBPasteboard.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FBPasteboard.m; sourceTree = "<group>"; };
@@ -1954,8 +1948,6 @@
1954
1948
  7140974A1FAE1B51008FB2C5 /* FBW3CActionsSynthesizer.m */,
1955
1949
  713AE573243A53BE0000D657 /* FBW3CActionsHelpers.h */,
1956
1950
  713AE574243A53BE0000D657 /* FBW3CActionsHelpers.m */,
1957
- 718D2C102C60BAE3000788F2 /* FBWebServerParams.h */,
1958
- 718D2C112C60BAE3000788F2 /* FBWebServerParams.m */,
1959
1951
  7157B28F221DADD2001C348C /* FBXCAXClientProxy.h */,
1960
1952
  7157B290221DADD2001C348C /* FBXCAXClientProxy.m */,
1961
1953
  EE5A24401F136C8D0078B1D9 /* FBXCodeCompatibility.h */,
@@ -2471,7 +2463,6 @@
2471
2463
  641EE6D62240C5CA00173FCB /* FBLogger.h in Headers */,
2472
2464
  71BB58F72B96531900CB9BFE /* FBScreenRecordingContainer.h in Headers */,
2473
2465
  641EE6D72240C5CA00173FCB /* XCTestObserver.h in Headers */,
2474
- 718D2C142C60BAE3000788F2 /* FBWebServerParams.h in Headers */,
2475
2466
  641EE6D82240C5CA00173FCB /* XCUIElement.h in Headers */,
2476
2467
  641EE6D92240C5CA00173FCB /* XCKeyboardInputSolver.h in Headers */,
2477
2468
  718226CB2587443700661B83 /* GCDAsyncUdpSocket.h in Headers */,
@@ -2727,7 +2718,6 @@
2727
2718
  EE35AD311E3B77D600A02D78 /* XCKeyboardLayout.h in Headers */,
2728
2719
  716C9DFA27315D21005AD475 /* FBReflectionUtils.h in Headers */,
2729
2720
  E444DCB624913C220060D7EB /* RouteRequest.h in Headers */,
2730
- 718D2C132C60BAE3000788F2 /* FBWebServerParams.h in Headers */,
2731
2721
  71F5BE23252E576C00EE9EBA /* XCUIElement+FBSwiping.h in Headers */,
2732
2722
  718226CC2587443700661B83 /* GCDAsyncSocket.h in Headers */,
2733
2723
  EE35AD3B1E3B77D600A02D78 /* XCTAsyncActivity-Protocol.h in Headers */,
@@ -3103,7 +3093,6 @@
3103
3093
  641EE5D72240C5CA00173FCB /* FBScreenshotCommands.m in Sources */,
3104
3094
  71F3E7D725417FF400E0C22B /* FBSettings.m in Sources */,
3105
3095
  641EE5D92240C5CA00173FCB /* XCUIElement+FBPickerWheel.m in Sources */,
3106
- 718D2C152C60BAE3000788F2 /* FBWebServerParams.m in Sources */,
3107
3096
  641EE5DA2240C5CA00173FCB /* XCUIApplicationProcessDelay.m in Sources */,
3108
3097
  641EE5DB2240C5CA00173FCB /* FBXPath.m in Sources */,
3109
3098
  71C8E55425399A6B008572C1 /* XCUIApplication+FBQuiescence.m in Sources */,
@@ -3293,7 +3282,6 @@
3293
3282
  AD76723E1D6B7CC000610457 /* XCUIElement+FBTyping.m in Sources */,
3294
3283
  EE158AAF1CBD456F00A3E3F0 /* XCUIElement+FBAccessibility.m in Sources */,
3295
3284
  714E14BA29805CAE00375DD7 /* XCAXClient_iOS+FBSnapshotReqParams.m in Sources */,
3296
- 718D2C122C60BAE3000788F2 /* FBWebServerParams.m in Sources */,
3297
3285
  7150348821A6DAD600A0F4BA /* FBImageUtils.m in Sources */,
3298
3286
  E444DCAB24913C220060D7EB /* HTTPResponseProxy.m in Sources */,
3299
3287
  E444DC6D249131890060D7EB /* HTTPErrorResponse.m in Sources */,
@@ -20,7 +20,6 @@
20
20
  #import "FBRuntimeUtils.h"
21
21
  #import "FBActiveAppDetectionPoint.h"
22
22
  #import "FBXCodeCompatibility.h"
23
- #import "FBWebServerParams.h"
24
23
  #import "XCUIApplication+FBHelpers.h"
25
24
  #import "XCUIApplication+FBQuiescence.h"
26
25
  #import "XCUIDevice.h"
@@ -67,6 +66,7 @@
67
66
  return FBResponseWithStatus([FBCommandStatus invalidArgumentErrorWithMessage:@"URL is required" traceback:nil]);
68
67
  }
69
68
  NSString* bundleId = request.arguments[@"bundleId"];
69
+ NSNumber* idleTimeoutMs = request.arguments[@"idleTimeoutMs"];
70
70
  NSError *error;
71
71
  if (nil == bundleId) {
72
72
  if (![XCUIDevice.sharedDevice fb_openUrl:urlString error:&error]) {
@@ -76,6 +76,10 @@
76
76
  if (![XCUIDevice.sharedDevice fb_openUrl:urlString withApplication:bundleId error:&error]) {
77
77
  return FBResponseWithUnknownError(error);
78
78
  }
79
+ if (idleTimeoutMs.doubleValue > 0) {
80
+ XCUIApplication *app = [[XCUIApplication alloc] initWithBundleIdentifier:bundleId];
81
+ [app fb_waitUntilStableWithTimeout:FBMillisToSeconds(idleTimeoutMs.doubleValue)];
82
+ }
79
83
  }
80
84
  return FBResponseWithOK();
81
85
  }
@@ -177,18 +181,6 @@
177
181
  _XCTSetApplicationStateTimeout(defaultTimeout);
178
182
  }
179
183
  }
180
- if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"17.0") && [bundleID isEqualToString:FB_SAFARI_BUNDLE_ID]) {
181
- // Opening the default URL in Safari instead of an empty page helps
182
- // the remote debugger to avoid issues while looking for active web views
183
- FBWebServerParams *wsParams = FBWebServerParams.sharedInstance;
184
- NSString *healthEndpoint = [NSString stringWithFormat:@"http://127.0.0.1:%@/health", wsParams.port];
185
- id<FBResponsePayload> errorResponse = [self openDeepLink:healthEndpoint
186
- withApplication:bundleID
187
- timeout:capabilities[FB_CAP_APP_LAUNCH_STATE_TIMEOUT_SEC]];
188
- if (nil != errorResponse) {
189
- NSLog(@"Was not able to open the default URL %@ in Safari", healthEndpoint);
190
- }
191
- }
192
184
  }
193
185
  if (!app.running) {
194
186
  NSString *errorMsg = [NSString stringWithFormat:@"Cannot launch %@ application. Make sure the correct bundle identifier has been provided in capabilities and check the device log for possible crash report occurrences", bundleID];
@@ -15,11 +15,11 @@
15
15
  <key>CFBundlePackageType</key>
16
16
  <string>FMWK</string>
17
17
  <key>CFBundleShortVersionString</key>
18
- <string>8.8.0</string>
18
+ <string>8.9.0</string>
19
19
  <key>CFBundleSignature</key>
20
20
  <string>????</string>
21
21
  <key>CFBundleVersion</key>
22
- <string>8.8.0</string>
22
+ <string>8.9.0</string>
23
23
  <key>NSPrincipalClass</key>
24
24
  <string/>
25
25
  </dict>
@@ -23,7 +23,6 @@
23
23
  #import "FBUnknownCommands.h"
24
24
  #import "FBConfiguration.h"
25
25
  #import "FBLogger.h"
26
- #import "FBWebServerParams.h"
27
26
 
28
27
  #import "XCUIDevice+FBHelpers.h"
29
28
 
@@ -103,8 +102,6 @@ static NSString *const FBServerURLEndMarker = @"<-ServerURLHere";
103
102
 
104
103
  serverStarted = [self attemptToStartServer:self.server onPort:port withError:&error];
105
104
  if (serverStarted) {
106
- FBWebServerParams* wsParams = FBWebServerParams.sharedInstance;
107
- wsParams.port = @(self.server.port);
108
105
  break;
109
106
  }
110
107
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appium-webdriveragent",
3
- "version": "8.8.0",
3
+ "version": "8.9.0",
4
4
  "description": "Package bundling WebDriverAgent",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",