Rust client for Appium Server, for automated mobile app testing. It is based on fantoccini.
```rust use appiumclient::ClientBuilder; use appiumclient::capabilities::*;
async fn main() -> Result<(), Box
let client = ClientBuilder::native()
.capabilities(capabilities.into())
.connect("http://localhost:4723/wd/hub/")
.await?;
Ok(())
} ```
let element = client .findby(By::accessibilityid("Click this")) .await?;
element.click().await?; ```
let element = client .appiumwait() .forelement(By::uiautomator("new UiSelector().className(\"android.widget.ImageView\");")) .await?;
element.click().await?; ```
let element = client .appiumwait() .atmost(Duration::fromsecs(20)) .checkevery(Duration::frommillis(500)) .forelement(By::uiautomator("new UiSelector().className(\"android.widget.ImageView\");")) .await?;
element.click().await?; ```
find_all_by
.
```rust
// you need these to use Appium-enhanced wait with fantoccini's Client
use appiumclient::find::{AppiumFind, By};
use appiumclient::wait::AppiumWait;let result = client .appiumwait() .findallby(By::classname("android.widget.LinearLayout")) .await?;
result.first().unwrap().click().await?; ```