Trait appium_client::commands::location::SupportsLocation
source · pub trait SupportsLocation: AppiumClientTrait {
// Provided methods
fn location<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Location, CmdError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn set_location<'life0, 'async_trait>(
&'life0 self,
location: Location
) -> Pin<Box<dyn Future<Output = Result<Location, CmdError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
Retrieve current geolocation (or set it on emulator)
Provided Methods§
fn location<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Location, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
sourcefn set_location<'life0, 'async_trait>(
&'life0 self,
location: Location
) -> Pin<Box<dyn Future<Output = Result<Location, CmdError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn set_location<'life0, 'async_trait>( &'life0 self, location: Location ) -> Pin<Box<dyn Future<Output = Result<Location, CmdError>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
Tries to set location if the driver/device supports it. Returns location of device after the attempt.
Due to configuration or limitation of device, the location change may fail silently. The returned Location is the location that the device currently uses (or where is actually is).