appium-webdriveragent 8.7.12 → 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,19 @@
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
+
11
+ ## [8.8.0](https://github.com/appium/WebDriverAgent/compare/v8.7.12...v8.8.0) (2024-08-06)
12
+
13
+ ### Features
14
+
15
+ * Open the default URL in Safari upon session startup ([#929](https://github.com/appium/WebDriverAgent/issues/929)) ([97cf91d](https://github.com/appium/WebDriverAgent/commit/97cf91de34dc53e5f75f91829dc43224101c1b45))
16
+
1
17
  ## [8.7.12](https://github.com/appium/WebDriverAgent/compare/v8.7.11...v8.7.12) (2024-08-02)
2
18
 
3
19
  ### Miscellaneous Chores
@@ -66,6 +66,7 @@
66
66
  return FBResponseWithStatus([FBCommandStatus invalidArgumentErrorWithMessage:@"URL is required" traceback:nil]);
67
67
  }
68
68
  NSString* bundleId = request.arguments[@"bundleId"];
69
+ NSNumber* idleTimeoutMs = request.arguments[@"idleTimeoutMs"];
69
70
  NSError *error;
70
71
  if (nil == bundleId) {
71
72
  if (![XCUIDevice.sharedDevice fb_openUrl:urlString error:&error]) {
@@ -75,6 +76,10 @@
75
76
  if (![XCUIDevice.sharedDevice fb_openUrl:urlString withApplication:bundleId error:&error]) {
76
77
  return FBResponseWithUnknownError(error);
77
78
  }
79
+ if (idleTimeoutMs.doubleValue > 0) {
80
+ XCUIApplication *app = [[XCUIApplication alloc] initWithBundleIdentifier:bundleId];
81
+ [app fb_waitUntilStableWithTimeout:FBMillisToSeconds(idleTimeoutMs.doubleValue)];
82
+ }
78
83
  }
79
84
  return FBResponseWithOK();
80
85
  }
@@ -15,11 +15,11 @@
15
15
  <key>CFBundlePackageType</key>
16
16
  <string>FMWK</string>
17
17
  <key>CFBundleShortVersionString</key>
18
- <string>8.7.12</string>
18
+ <string>8.9.0</string>
19
19
  <key>CFBundleSignature</key>
20
20
  <string>????</string>
21
21
  <key>CFBundleVersion</key>
22
- <string>8.7.12</string>
22
+ <string>8.9.0</string>
23
23
  <key>NSPrincipalClass</key>
24
24
  <string/>
25
25
  </dict>
@@ -14,6 +14,9 @@
14
14
 
15
15
  NS_ASSUME_NONNULL_BEGIN
16
16
 
17
+ /** Bundle identifier of Mobile Safari browser */
18
+ extern NSString* const FB_SAFARI_BUNDLE_ID;
19
+
17
20
  /**
18
21
  Class that represents testing session
19
22
  */
@@ -33,6 +33,8 @@
33
33
  */
34
34
  NSString *const FBDefaultApplicationAuto = @"auto";
35
35
 
36
+ NSString *const FB_SAFARI_BUNDLE_ID = @"com.apple.mobilesafari";
37
+
36
38
  @interface FBSession ()
37
39
  @property (nullable, nonatomic) XCUIApplication *testedApplication;
38
40
  @property (nonatomic) BOOL isTestedApplicationExpectedToRun;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Copyright (c) 2015-present, Facebook, Inc.
3
+ * All rights reserved.
4
+ *
5
+ * This source code is licensed under the BSD-style license found in the
6
+ * LICENSE file in the root directory of this source tree. An additional grant
7
+ * of patent rights can be found in the PATENTS file in the same directory.
8
+ */
9
+
10
+ #import <Foundation/Foundation.h>
11
+
12
+ NS_ASSUME_NONNULL_BEGIN
13
+
14
+ @interface FBWebServerParams : NSObject
15
+
16
+ /** The local port number WDA server is running on */
17
+ @property (nonatomic, nullable) NSNumber *port;
18
+
19
+ + (id)sharedInstance;
20
+
21
+ @end
22
+
23
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright (c) 2015-present, Facebook, Inc.
3
+ * All rights reserved.
4
+ *
5
+ * This source code is licensed under the BSD-style license found in the
6
+ * LICENSE file in the root directory of this source tree. An additional grant
7
+ * of patent rights can be found in the PATENTS file in the same directory.
8
+ */
9
+
10
+ #import "FBWebServerParams.h"
11
+
12
+ @implementation FBWebServerParams
13
+
14
+ + (instancetype)sharedInstance
15
+ {
16
+ static FBWebServerParams *instance;
17
+ static dispatch_once_t onceToken;
18
+ dispatch_once(&onceToken, ^{
19
+ instance = [[self alloc] init];
20
+ });
21
+ return instance;
22
+ }
23
+
24
+ @end
@@ -25,15 +25,13 @@
25
25
  @end
26
26
 
27
27
 
28
- static NSString *const SAFARI_BUNDLE_ID = @"com.apple.mobilesafari";
29
-
30
28
  @implementation FBSafariAlertIntegrationTests
31
29
 
32
30
  - (void)setUp
33
31
  {
34
32
  [super setUp];
35
33
  self.session = [FBSession initWithApplication:XCUIApplication.fb_activeApplication];
36
- [self.session launchApplicationWithBundleId:SAFARI_BUNDLE_ID
34
+ [self.session launchApplicationWithBundleId:FB_SAFARI_BUNDLE_ID
37
35
  shouldWaitForQuiescence:nil
38
36
  arguments:nil
39
37
  environment:nil];
@@ -42,7 +40,7 @@ static NSString *const SAFARI_BUNDLE_ID = @"com.apple.mobilesafari";
42
40
 
43
41
  - (void)tearDown
44
42
  {
45
- [self.session terminateApplicationWithBundleId:SAFARI_BUNDLE_ID];
43
+ [self.session terminateApplicationWithBundleId:FB_SAFARI_BUNDLE_ID];
46
44
  }
47
45
 
48
46
  - (void)disabled_testCanHandleSafariInputPrompt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appium-webdriveragent",
3
- "version": "8.7.12",
3
+ "version": "8.9.0",
4
4
  "description": "Package bundling WebDriverAgent",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",