File tree Expand file tree Collapse file tree 5 files changed +41
-5
lines changed Expand file tree Collapse file tree 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+
118<a name =" 5.3.0 " ></a >
219# [ 5.3.0] ( https://github.com/NativeScript/nativescript-dev-appium/compare/v5.2.0...v5.3.0 ) (2019-06-10)
320
Original file line number Diff line number Diff line change 11export declare enum AutomationName {
22 UiAutomator2 = "UIAutomator2" ,
3+ UiAutomator1 = "UIAutomator1" ,
34 Appium = "Appium" ,
45 XCUITest = "XCUITest"
56}
Original file line number Diff line number Diff line change 11export enum AutomationName {
22 UiAutomator2 = "UIAutomator2" ,
3+ UiAutomator1 = "UIAutomator1" ,
34 Appium = "Appium" ,
45 XCUITest = "XCUITest" ,
56}
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ export declare class NsCapabilities implements INsCapabilities {
7777 shouldSetFullResetOption ( ) : void ;
7878 private setAutomationName ;
7979 tryGetAndroidApiLevel ( ) : number ;
80+ tryGetIOSApiLevel ( ) : number ;
8081 private resolveApplication ;
8182 private checkMandatoryCapabilities ;
8283 private throwExceptions ;
Original file line number Diff line number Diff line change @@ -309,11 +309,25 @@ export class NsCapabilities implements INsCapabilities {
309309 this . automationName = AutomationName . Appium ; break ;
310310 case AutomationName . XCUITest . toString ( ) . toLowerCase ( ) :
311311 this . automationName = AutomationName . XCUITest ; break ;
312+ case AutomationName . UiAutomator1 . toString ( ) . toLowerCase ( ) :
313+ this . automationName = AutomationName . UiAutomator1 ; break ;
312314 }
313315 } else {
316+ const apiLevel = this . tryGetApiLevel ( ) ;
314317 if ( this . isAndroid ) {
315- if ( this . tryGetAndroidApiLevel ( ) >= 6 || ( this . appiumCaps [ "apiLevel" ] && + this . appiumCaps [ "apiLevel" ] ) >= 23 ) {
318+ if ( ( apiLevel >= 6 && apiLevel <= 17 )
319+ || apiLevel >= 23 ) {
316320 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 ;
317331 }
318332 }
319333 }
@@ -327,13 +341,15 @@ export class NsCapabilities implements INsCapabilities {
327341 }
328342 }
329343
330- tryGetAndroidApiLevel ( ) {
344+ tryGetApiLevel ( ) {
331345 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 ( '.' ) ;
335349 }
350+ return apiLevel ;
336351 } catch ( error ) { }
352+
337353 return undefined ;
338354 }
339355
You can’t perform that action at this time.
0 commit comments