Package io.appium.java_client.flutter
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 extendsCanExecuteFlutterScripts
and provides methods to support mocking of camera inputs in Flutter applications.
-
-
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 io.appium.java_client.flutter.CanExecuteFlutterScripts
executeFlutterCommand, executeFlutterCommand
-
-
-
-
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
-
-