diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0880b4f..3592494 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,20 @@
+
+# [6.0.0](https://github.com/NativeScript/nativescript-dev-appium/compare/5.3.0...6.0.0) (2019-08-08)
+
+
+### Bug Fixes
+
+* typos ([65c6aa3](https://github.com/NativeScript/nativescript-dev-appium/commit/65c6aa3))
+* **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))
+
+
+### Features
+
+* image-helper ([#236](https://github.com/NativeScript/nativescript-dev-appium/issues/236)) ([0d2c9fd](https://github.com/NativeScript/nativescript-dev-appium/commit/0d2c9fd))
+* resolve symlinked storages ([#235](https://github.com/NativeScript/nativescript-dev-appium/issues/235)) ([ef270c9](https://github.com/NativeScript/nativescript-dev-appium/commit/ef270c9))
+
+
+
# [5.3.0](https://github.com/NativeScript/nativescript-dev-appium/compare/v5.2.0...v5.3.0) (2019-06-10)
diff --git a/lib/automation-name.d.ts b/lib/automation-name.d.ts
index e77c68f..d0270fa 100644
--- a/lib/automation-name.d.ts
+++ b/lib/automation-name.d.ts
@@ -1,5 +1,6 @@
export declare enum AutomationName {
UiAutomator2 = "UIAutomator2",
+ UiAutomator1 = "UIAutomator1",
Appium = "Appium",
XCUITest = "XCUITest"
}
diff --git a/lib/automation-name.ts b/lib/automation-name.ts
index 862156d..35e9eb7 100644
--- a/lib/automation-name.ts
+++ b/lib/automation-name.ts
@@ -1,5 +1,6 @@
export enum AutomationName {
UiAutomator2 = "UIAutomator2",
+ UiAutomator1 = "UIAutomator1",
Appium = "Appium",
XCUITest = "XCUITest",
}
\ No newline at end of file
diff --git a/lib/ns-capabilities.d.ts b/lib/ns-capabilities.d.ts
index 7c94d5f..ea640cc 100644
--- a/lib/ns-capabilities.d.ts
+++ b/lib/ns-capabilities.d.ts
@@ -77,6 +77,7 @@ export declare class NsCapabilities implements INsCapabilities {
shouldSetFullResetOption(): void;
private setAutomationName;
tryGetAndroidApiLevel(): number;
+ tryGetIOSApiLevel(): number;
private resolveApplication;
private checkMandatoryCapabilities;
private throwExceptions;
diff --git a/lib/ns-capabilities.ts b/lib/ns-capabilities.ts
index fd616a5..1eaab31 100644
--- a/lib/ns-capabilities.ts
+++ b/lib/ns-capabilities.ts
@@ -309,11 +309,25 @@ export class NsCapabilities implements INsCapabilities {
this.automationName = AutomationName.Appium; break;
case AutomationName.XCUITest.toString().toLowerCase():
this.automationName = AutomationName.XCUITest; break;
+ case AutomationName.UiAutomator1.toString().toLowerCase():
+ this.automationName = AutomationName.UiAutomator1; break;
}
} else {
+ const apiLevel = this.tryGetApiLevel();
if (this.isAndroid) {
- if (this.tryGetAndroidApiLevel() >= 6 || (this.appiumCaps["apiLevel"] && +this.appiumCaps["apiLevel"]) >= 23) {
+ if ((apiLevel >= 6 && apiLevel <= 17)
+ || apiLevel >= 23) {
this.automationName = AutomationName.UiAutomator2;
+ } else {
+ this.automationName = AutomationName.UiAutomator1;
+ }
+ }
+
+ if (this.isIOS) {
+ if (apiLevel < 10) {
+ logWarn("Provide automationName")
+ } else {
+ this.automationName = AutomationName.XCUITest;
}
}
}
@@ -327,13 +341,15 @@ export class NsCapabilities implements INsCapabilities {
}
}
- tryGetAndroidApiLevel() {
+ tryGetApiLevel() {
try {
- if (this.appiumCaps["platformVersion"]) {
- const apiLevel = this.appiumCaps["platformVersion"].split(".").splice(0, 2).join('.');
- return +apiLevel;
+ const apiLevel = this.appiumCaps["platformVersion"] || this.appiumCaps["apiLevel"];
+ if (this.isAndroid && apiLevel) {
+ return apiLevel.split(".").splice(0, 2).join('.');
}
+ return apiLevel;
} catch (error) { }
+
return undefined;
}