Interface SupportsFlutterCameraMocking

All Superinterfaces:
CanExecuteFlutterScripts, org.openqa.selenium.JavascriptExecutor
All Known Subinterfaces:
FlutterIntegrationTestDriver
All Known Implementing Classes:
FlutterAndroidDriver, FlutterIOSDriver

public interface SupportsFlutterCameraMocking extends CanExecuteFlutterScripts
This interface extends CanExecuteFlutterScripts and provides methods to support mocking of camera inputs in Flutter applications.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Activates the injected image identified by the specified image ID in the Flutter application.
    default String
    Injects a mock image into the Flutter application using the provided file.
    default String
    injectMockImage(String base64Image)
    Injects a mock image into the Flutter application using the provided Base64-encoded image string.

    Methods inherited from interface io.appium.java_client.flutter.CanExecuteFlutterScripts

    executeFlutterCommand, executeFlutterCommand

    Methods inherited from interface org.openqa.selenium.JavascriptExecutor

    executeAsyncScript, executeScript, executeScript, getPinnedScripts, pin, unpin
  • Method Details

    • injectMockImage

      default String injectMockImage(File image) throws IOException
      Injects a mock image into the Flutter application using the provided file.
      Parameters:
      image - the image file to be mocked (must be in PNG format)
      Returns:
      an String representing a unique id of the injected image
      Throws:
      IOException - if an I/O error occurs while reading the image file
    • injectMockImage

      default String injectMockImage(String base64Image)
      Injects a mock image into the Flutter application using the provided Base64-encoded image string.
      Parameters:
      base64Image - the Base64-encoded string representation of the image (must be in PNG format)
      Returns:
      an String representing the result of the injection operation
    • activateInjectedImage

      default void activateInjectedImage(String imageId)
      Activates the injected image identified by the specified image ID in the Flutter application.
      Parameters:
      imageId - the ID of the injected image to activate