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
This interface extends
CanExecuteFlutterScripts and provides methods
to support mocking of camera inputs in Flutter applications.-
Method Summary
Modifier and TypeMethodDescriptiondefault voidactivateInjectedImage(String imageId) Activates the injected image identified by the specified image ID in the Flutter application.default StringinjectMockImage(File image) Injects a mock image into the Flutter application using the provided file.default StringinjectMockImage(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, executeFlutterCommandMethods inherited from interface org.openqa.selenium.JavascriptExecutor
executeAsyncScript, executeScript, executeScript, getPinnedScripts, pin, unpin
-
Method Details
-
injectMockImage
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
Stringrepresenting a unique id of the injected image - Throws:
IOException- if an I/O error occurs while reading the image file
-
injectMockImage
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
Stringrepresenting the result of the injection operation
-
activateInjectedImage
Activates the injected image identified by the specified image ID in the Flutter application.- Parameters:
imageId- the ID of the injected image to activate
-