Interface SupportsFlutterCameraMocking

    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default void activateInjectedImage​(java.lang.String imageId)
      Activates the injected image identified by the specified image ID in the Flutter application.
      default java.lang.String injectMockImage​(java.io.File image)
      Injects a mock image into the Flutter application using the provided file.
      default java.lang.String injectMockImage​(java.lang.String base64Image)
      Injects a mock image into the Flutter application using the provided Base64-encoded image string.
      • Methods inherited from interface org.openqa.selenium.JavascriptExecutor

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

      • injectMockImage

        default java.lang.String injectMockImage​(java.io.File image)
                                          throws java.io.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:
        java.io.IOException - if an I/O error occurs while reading the image file
      • injectMockImage

        default java.lang.String injectMockImage​(java.lang.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​(java.lang.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