appium-client
Rust client for Appium Server, for automated mobile app testing. It is based on fantoccini.
Sample usage
- Create Appium client that will be used to issue commands and locate elements.
use ClientBuilder;
use *;
async
- Locate an element by using your favorite location strategy (eg. by UiAutomator 2).
// you need this to use Appium locators with fantoccini's Client
use ;
let element = client
.find_by
.await?;
element.click.await?;
- You can wait for element if it does not appear immediately on screen.
// you need these to use Appium-enhanced wait with fantoccini's Client
use ;
use AppiumWait;
let element = client
.appium_wait
.for_element
.await?;
element.click.await?;
- You can define how long to wait for the element and how often to check if it's already appeared.
// you need these to use Appium-enhanced wait with fantoccini's Client
use ;
use AppiumWait;
let element = client
.appium_wait
.at_most
.check_every
.for_element
.await?;
element.click.await?;
- To locate multiple elements, use
find_all_by.
// you need these to use Appium-enhanced wait with fantoccini's Client
use ;
use AppiumWait;
let result = client
.appium_wait
.find_all_by
.await?;
result.first.unwrap.click.await?;