Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add print espresso path as a command #854

Merged
merged 4 commits into from
Feb 4, 2023
Merged
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
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ On top of standard Appium requirements Espresso driver also expects the followin
- The package under test must not have mangled class names (e.g. [Proguard](https://developer.android.com/studio/build/shrink-code) must not be enabled for it)


## Scripts

- `appium driver run print-espresso-path` prints the path to the Appium Espresso server root. You can modify the gradle file directly if [Espresso Build Config](#espresso-build-config) was not sufficient.

## Capabilities

### General
Expand Down Expand Up @@ -206,7 +210,7 @@ In order to change between subdrivers use the [driver](#settings-api) setting. S
- click, isDisplayed, isEnabled, clear, getText, sendKeys, getElementRect, getValue, isSelected: These commands should properly support compose elements.
- getAttribute: Accepts and returns Compose-specific element attributes. See [Compose Element Attributes](#compose-element-attributes) for the full list of supported Compose element attributes.
- getElementScreenshot: Fetches a screenshot of the given Compose element. Available since driver version *2.14.0*
- `mobile: swipe`: Performs swipe gesture on the given element in the given direction.
- `mobile: swipe`: Performs swipe gesture on the given element in the given direction.
The `swiper` argument is not supported in Compose mode. Available since driver version *2.15.0*

Calling other driver element-specific APIs not listed above would most likely throw an exception as Compose and Espresso elements are being stored in completely separated internal caches and must not be mixed.
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
"platformNames": [
"Android"
],
"mainClass": "EspressoDriver"
"mainClass": "EspressoDriver",
"scripts": {
"print-espresso-path": "./scripts/print-espresso-path.js"
}
},
"main": "./build/index.js",
"bin": {},
Expand Down
8 changes: 8 additions & 0 deletions scripts/print-espresso-path.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const path = require('path');

function printEspressoServerPath () {
const dstPath = path.resolve(__dirname, '..', 'espresso-server');
console.log(dstPath); // eslint-disable-line no-console
}

printEspressoServerPath();