Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/locators.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ export declare class Locator {
private _elementsList;
constructor(_platformName: string, _platformVersion: any);
readonly button: string;
readonly imageButton: string;
readonly listView: string;
readonly textField: string;
readonly textView: string;
readonly image: string;
readonly nsImage: string;
readonly allELementsList: Map<string, string>;
getElementByName(name: any): string;
private loadAndroidElements();
Expand Down
17 changes: 17 additions & 0 deletions lib/locators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,30 @@ export class Locator {
return this.getElementByName("button");
}

get imageButton() {
return this.getElementByName("image-button");
}

get listView() {
return this.getElementByName("listview");
}

get textField() {
return this.getElementByName("textfield");
}

get textView() {
return this.getElementByName("textview");
}

get image() {
return this.getElementByName("image");
}

get nsImage() {
return this.getElementByName("ns-image");
}

get allELementsList() {
return this._elementsList;
}
Expand All @@ -42,6 +57,7 @@ export class Locator {
this._elementsList.set("activityindicator", "android.widget.ProgressBar");
this._elementsList.set("button", "android.widget.Button");
this._elementsList.set("image", "android.widget.ImageView");
this._elementsList.set("ns-image", "org.nativescript.widget.ImageView");
this._elementsList.set("image-button", "android.widget.ImageButton");
this._elementsList.set("imagebutton", "android.widget.ImageButton");
this._elementsList.set("datepicker", "android.widget.DatePicker");
Expand Down Expand Up @@ -79,6 +95,7 @@ export class Locator {
this._elementsList.set("datepicker", this.createIosElement("DatePicker"));
this._elementsList.set("htmlview", this.createIosElement("TextView"));
this._elementsList.set("image", this.createIosElement("Image"));
this._elementsList.set("ns-image", this.createIosElement("Image"));
this._elementsList.set("label", this.createIosElement("StaticText"));
this._elementsList.set("absolutelayout", this.createIosElement("View"));
this._elementsList.set("docklayout", this.createIosElement("View"));
Expand Down
98 changes: 48 additions & 50 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,51 @@
{
"name": "nativescript-dev-appium",
"version": "3.0.0",
"description": "A NativeScript plugin to help integrate and run Appium tests",
"author": "Telerik",
"license": "MIT",
"main": "./index.js",
"directories": {
"lib": "./lib"
},
"repository": {
"type": "git",
"url": "https://github.com/NativeScript/nativescript-dev-appium.git"
},
"keywords": [
"nativescript",
"appium",
"test"
],
"maintainers": [
{
"name": "hdeshev",
"email": "hristo.deshev@telerik.com"
"name": "nativescript-dev-appium",
"version": "3.0.0",
"description": "A NativeScript plugin to help integrate and run Appium tests",
"author": "Telerik",
"license": "MIT",
"main": "./index.js",
"directories": {
"lib": "./lib"
},
{
"name": "SvetoslavTsenov",
"email": "tsenov@progress.com"
"repository": {
"type": "git",
"url": "https://github.com/NativeScript/nativescript-dev-appium.git"
},
"keywords": [
"nativescript",
"appium",
"test"
],
"maintainers": [{
"name": "hdeshev",
"email": "hristo.deshev@telerik.com"
},
{
"name": "SvetoslavTsenov",
"email": "tsenov@progress.com"
}
],
"dependencies": {
"app-root-path": "^2.0.1",
"portastic": "^1.0.1",
"mobile-devices-controller": "^0.0.3",
"colors": "^1.1.2",
"blink-diff": "^1.0.13",
"glob": "*",
"wd": "^1.4.0",
"webdriverio": "^4.8.0",
"yargs": "^8.0.2",
"chai": "~4.1.1",
"chai-as-promised": "~7.1.1"
},
"devDependencies": {
"@types/node": "^7.0.5",
"@types/webdriverio": "^4.8.4",
"typescript": "^2.5.0"
},
"scripts": {
"postinstall": "node ./postinstall.js",
"compile": "tsc --watch"
}
],
"dependencies": {
"app-root-path": "^2.0.1",
"portastic": "^1.0.1",
"mobile-devices-controller": "^0.0.3",
"colors": "^1.1.2",
"blink-diff": "^1.0.13",
"glob": "*",
"wd": "^1.4.0",
"webdriverio": "^4.8.0",
"yargs": "^8.0.2",
"chai": "~4.1.1",
"chai-as-promised": "~7.1.1"
},
"devDependencies": {
"@types/node": "^7.0.5",
"@types/webdriverio": "^4.8.4",
"typescript": "^2.5.0"
},
"scripts": {
"postinstall": "node ./postinstall.js",
"compile": "tsc --watch",
"e2e": "tsc -p e2e && mocha --opts ./e2e/config/mocha.opts --"
}
}
}