Stop Image Injection (FR)

Perfecto Command

mobile:image.injection:stop

Purpose

Stops Perfecto from supplying an image to the application when the application tries to retrieve a camera image. Images are supplied by the device camera after invoking the command.

Used in conjunction with Start Image Injection.

Restriction: Image injection is supported for the front and back cameras of Android devices and the back camera of iOS devices. It is not supported for the front-camera of iOS devices.

Parameters

None

Return Value

None

Exceptions

None

Examples

Copy

Java sample

 Map<String, Object> params = new HashMap<>();
 Object res = driver.executeScript("mobile:image.injection:stop", params);
Copy

C# sample

 Dictionary<String, Object> pars = new Dictionary<String, Object>();
 driver.ExecuteScript("mobile:image.injection:stop", pars);