appium-webdriveragent 7.0.4 → 7.0.6
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.0.6](https://github.com/appium/WebDriverAgent/compare/v7.0.5...v7.0.6) (2024-03-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Miscellaneous Chores
|
|
5
|
+
|
|
6
|
+
* Handle app startup errors as session creation exceptions ([#855](https://github.com/appium/WebDriverAgent/issues/855)) ([0ec5398](https://github.com/appium/WebDriverAgent/commit/0ec5398e9cb4b0e5ab133cc0c330b85b3d37766e))
|
|
7
|
+
|
|
8
|
+
## [7.0.5](https://github.com/appium/WebDriverAgent/compare/v7.0.4...v7.0.5) (2024-03-03)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Reverts
|
|
12
|
+
|
|
13
|
+
* Revert "chore: tune release packages (#856)" (#857) ([dc72015](https://github.com/appium/WebDriverAgent/commit/dc720157a60925451e6d5935abcd168082d44785)), closes [#856](https://github.com/appium/WebDriverAgent/issues/856) [#857](https://github.com/appium/WebDriverAgent/issues/857)
|
|
14
|
+
|
|
1
15
|
## [7.0.4](https://github.com/appium/WebDriverAgent/compare/v7.0.3...v7.0.4) (2024-03-03)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
#import "FBCapabilities.h"
|
|
13
13
|
#import "FBConfiguration.h"
|
|
14
|
+
#import "FBExceptions.h"
|
|
14
15
|
#import "FBLogger.h"
|
|
15
16
|
#import "FBProtocolHelpers.h"
|
|
16
17
|
#import "FBRouteRequest.h"
|
|
@@ -91,7 +92,7 @@
|
|
|
91
92
|
traceback:nil]);
|
|
92
93
|
}
|
|
93
94
|
if (nil == (capabilities = FBParseCapabilities((NSDictionary *)request.arguments[@"capabilities"], &error))) {
|
|
94
|
-
return FBResponseWithStatus([FBCommandStatus sessionNotCreatedError:error.
|
|
95
|
+
return FBResponseWithStatus([FBCommandStatus sessionNotCreatedError:error.localizedDescription traceback:nil]);
|
|
95
96
|
}
|
|
96
97
|
|
|
97
98
|
[FBConfiguration resetSessionSettings];
|
|
@@ -159,12 +160,16 @@
|
|
|
159
160
|
if (![XCUIDevice.sharedDevice fb_openUrl:initialUrl
|
|
160
161
|
withApplication:bundleID
|
|
161
162
|
error:&openError]) {
|
|
162
|
-
NSString *errorMsg = [NSString stringWithFormat:@"Cannot open the URL %@
|
|
163
|
-
initialUrl, bundleID, openError.
|
|
163
|
+
NSString *errorMsg = [NSString stringWithFormat:@"Cannot open the URL %@ with the %@ application. Original error: %@",
|
|
164
|
+
initialUrl, bundleID, openError.localizedDescription];
|
|
164
165
|
return FBResponseWithStatus([FBCommandStatus sessionNotCreatedError:errorMsg traceback:nil]);
|
|
165
166
|
}
|
|
166
167
|
} else {
|
|
167
|
-
|
|
168
|
+
@try {
|
|
169
|
+
[app launch];
|
|
170
|
+
} @catch (NSException *e) {
|
|
171
|
+
return FBResponseWithStatus([FBCommandStatus sessionNotCreatedError:e.reason traceback:nil]);
|
|
172
|
+
}
|
|
168
173
|
}
|
|
169
174
|
if (!app.running) {
|
|
170
175
|
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];
|
|
@@ -178,7 +183,7 @@
|
|
|
178
183
|
withApplication:bundleID
|
|
179
184
|
error:&openError]) {
|
|
180
185
|
NSString *errorMsg = [NSString stringWithFormat:@"Cannot open the URL %@ with the %@ application. Original error: %@",
|
|
181
|
-
initialUrl, bundleID, openError.
|
|
186
|
+
initialUrl, bundleID, openError.localizedDescription];
|
|
182
187
|
return FBResponseWithStatus([FBCommandStatus sessionNotCreatedError:errorMsg traceback:nil]);
|
|
183
188
|
}
|
|
184
189
|
} else {
|
|
@@ -191,7 +196,7 @@
|
|
|
191
196
|
NSError *openError;
|
|
192
197
|
if (![XCUIDevice.sharedDevice fb_openUrl:initialUrl error:&openError]) {
|
|
193
198
|
NSString *errorMsg = [NSString stringWithFormat:@"Cannot open the URL %@. Original error: %@",
|
|
194
|
-
initialUrl, openError.
|
|
199
|
+
initialUrl, openError.localizedDescription];
|
|
195
200
|
return FBResponseWithStatus([FBCommandStatus sessionNotCreatedError:errorMsg traceback:nil]);
|
|
196
201
|
}
|
|
197
202
|
}
|
|
@@ -396,7 +401,8 @@
|
|
|
396
401
|
NSError *error;
|
|
397
402
|
if (![FBActiveAppDetectionPoint.sharedInstance setCoordinatesWithString:(NSString *)[settings objectForKey:FB_SETTING_ACTIVE_APP_DETECTION_POINT]
|
|
398
403
|
error:&error]) {
|
|
399
|
-
return FBResponseWithStatus([FBCommandStatus invalidArgumentErrorWithMessage:error.
|
|
404
|
+
return FBResponseWithStatus([FBCommandStatus invalidArgumentErrorWithMessage:error.localizedDescription
|
|
405
|
+
traceback:nil]);
|
|
400
406
|
}
|
|
401
407
|
}
|
|
402
408
|
if (nil != [settings objectForKey:FB_SETTING_INCLUDE_NON_MODAL_ELEMENTS]) {
|
|
@@ -427,7 +433,7 @@
|
|
|
427
433
|
NSError *error;
|
|
428
434
|
if (![FBConfiguration setScreenshotOrientation:(NSString *)[settings objectForKey:FB_SETTING_SCREENSHOT_ORIENTATION]
|
|
429
435
|
error:&error]) {
|
|
430
|
-
return FBResponseWithStatus([FBCommandStatus invalidArgumentErrorWithMessage:error.
|
|
436
|
+
return FBResponseWithStatus([FBCommandStatus invalidArgumentErrorWithMessage:error.localizedDescription
|
|
431
437
|
traceback:nil]);
|
|
432
438
|
}
|
|
433
439
|
}
|
|
@@ -45,6 +45,9 @@
|
|
|
45
45
|
} else if ([exception.name isEqualToString:FBTimeoutException]) {
|
|
46
46
|
commandStatus = [FBCommandStatus timeoutErrorWithMessage:exception.reason
|
|
47
47
|
traceback:traceback];
|
|
48
|
+
} else if ([exception.name isEqualToString:FBSessionCreationException]) {
|
|
49
|
+
commandStatus = [FBCommandStatus sessionNotCreatedError:exception.reason
|
|
50
|
+
traceback:traceback];
|
|
48
51
|
} else {
|
|
49
52
|
commandStatus = [FBCommandStatus unknownErrorWithMessage:exception.reason
|
|
50
53
|
traceback:traceback];
|
|
@@ -14,6 +14,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
14
14
|
/*! Exception used to notify about missing session */
|
|
15
15
|
extern NSString *const FBSessionDoesNotExistException;
|
|
16
16
|
|
|
17
|
+
/*! Exception used to notify about session creation issues */
|
|
18
|
+
extern NSString *const FBSessionCreationException;
|
|
19
|
+
|
|
17
20
|
/*! Exception used to notify about application deadlock */
|
|
18
21
|
extern NSString *const FBApplicationDeadlockDetectedException;
|
|
19
22
|
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
#import "FBExceptions.h"
|
|
11
11
|
|
|
12
12
|
NSString *const FBInvalidArgumentException = @"FBInvalidArgumentException";
|
|
13
|
+
NSString *const FBSessionCreationException = @"FBSessionCreationException";
|
|
13
14
|
NSString *const FBSessionDoesNotExistException = @"FBSessionDoesNotExistException";
|
|
14
15
|
NSString *const FBApplicationDeadlockDetectedException = @"FBApplicationDeadlockDetectedException";
|
|
15
16
|
NSString *const FBElementAttributeUnknownException = @"FBElementAttributeUnknownException";
|