File tree 5 files changed +41
-5
lines changed
5 files changed +41
-5
lines changed Original file line number Diff line number Diff line change
1
+ <a name =" 6.0.0 " ></a >
2
+ # [ 6.0.0] ( https://github.com/NativeScript/nativescript-dev-appium/compare/5.3.0...6.0.0 ) (2019-08-08)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * typos ([ 65c6aa3] ( https://github.com/NativeScript/nativescript-dev-appium/commit/65c6aa3 ) )
8
+ * ** image-helper:** increase image name ([ #237 ] ( https://github.com/NativeScript/nativescript-dev-appium/issues/237 ) ) ([ c075af8] ( https://github.com/NativeScript/nativescript-dev-appium/commit/c075af8 ) )
9
+
10
+
11
+ ### Features
12
+
13
+ * image-helper ([ #236 ] ( https://github.com/NativeScript/nativescript-dev-appium/issues/236 ) ) ([ 0d2c9fd] ( https://github.com/NativeScript/nativescript-dev-appium/commit/0d2c9fd ) )
14
+ * resolve symlinked storages ([ #235 ] ( https://github.com/NativeScript/nativescript-dev-appium/issues/235 ) ) ([ ef270c9] ( https://github.com/NativeScript/nativescript-dev-appium/commit/ef270c9 ) )
15
+
16
+
17
+
1
18
<a name =" 5.3.0 " ></a >
2
19
# [ 5.3.0] ( https://github.com/NativeScript/nativescript-dev-appium/compare/v5.2.0...v5.3.0 ) (2019-06-10)
3
20
Original file line number Diff line number Diff line change 1
1
export declare enum AutomationName {
2
2
UiAutomator2 = "UIAutomator2" ,
3
+ UiAutomator1 = "UIAutomator1" ,
3
4
Appium = "Appium" ,
4
5
XCUITest = "XCUITest"
5
6
}
Original file line number Diff line number Diff line change 1
1
export enum AutomationName {
2
2
UiAutomator2 = "UIAutomator2" ,
3
+ UiAutomator1 = "UIAutomator1" ,
3
4
Appium = "Appium" ,
4
5
XCUITest = "XCUITest" ,
5
6
}
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ export declare class NsCapabilities implements INsCapabilities {
77
77
shouldSetFullResetOption ( ) : void ;
78
78
private setAutomationName ;
79
79
tryGetAndroidApiLevel ( ) : number ;
80
+ tryGetIOSApiLevel ( ) : number ;
80
81
private resolveApplication ;
81
82
private checkMandatoryCapabilities ;
82
83
private throwExceptions ;
Original file line number Diff line number Diff line change @@ -309,11 +309,25 @@ export class NsCapabilities implements INsCapabilities {
309
309
this . automationName = AutomationName . Appium ; break ;
310
310
case AutomationName . XCUITest . toString ( ) . toLowerCase ( ) :
311
311
this . automationName = AutomationName . XCUITest ; break ;
312
+ case AutomationName . UiAutomator1 . toString ( ) . toLowerCase ( ) :
313
+ this . automationName = AutomationName . UiAutomator1 ; break ;
312
314
}
313
315
} else {
316
+ const apiLevel = this . tryGetApiLevel ( ) ;
314
317
if ( this . isAndroid ) {
315
- if ( this . tryGetAndroidApiLevel ( ) >= 6 || ( this . appiumCaps [ "apiLevel" ] && + this . appiumCaps [ "apiLevel" ] ) >= 23 ) {
318
+ if ( ( apiLevel >= 6 && apiLevel <= 17 )
319
+ || apiLevel >= 23 ) {
316
320
this . automationName = AutomationName . UiAutomator2 ;
321
+ } else {
322
+ this . automationName = AutomationName . UiAutomator1 ;
323
+ }
324
+ }
325
+
326
+ if ( this . isIOS ) {
327
+ if ( apiLevel < 10 ) {
328
+ logWarn ( "Provide automationName" )
329
+ } else {
330
+ this . automationName = AutomationName . XCUITest ;
317
331
}
318
332
}
319
333
}
@@ -327,13 +341,15 @@ export class NsCapabilities implements INsCapabilities {
327
341
}
328
342
}
329
343
330
- tryGetAndroidApiLevel ( ) {
344
+ tryGetApiLevel ( ) {
331
345
try {
332
- if ( this . appiumCaps [ "platformVersion" ] ) {
333
- const apiLevel = this . appiumCaps [ "platformVersion" ] . split ( "." ) . splice ( 0 , 2 ) . join ( '.' ) ;
334
- return + apiLevel ;
346
+ const apiLevel = this . appiumCaps [ "platformVersion" ] || this . appiumCaps [ "apiLevel" ] ;
347
+ if ( this . isAndroid && apiLevel ) {
348
+ return apiLevel . split ( "." ) . splice ( 0 , 2 ) . join ( '.' ) ;
335
349
}
350
+ return apiLevel ;
336
351
} catch ( error ) { }
352
+
337
353
return undefined ;
338
354
}
339
355
You can’t perform that action at this time.
0 commit comments