click(), "flutter:enterText" methods not throwing exception when element not present or supplied invalid locators.
@shibupanda Maybe it is same as waitFor/waitForAbsent
@ahashmi24 can you have a specific code example, the way I read it, not throwing exception is expected from https://api.flutter.dev/flutter/flutter_driver/FlutterDriver/enterText.html ; this method is used to enter text into focused text field, i.e you have to find and focus that text field first, and if there is no text field focused, the "text input events" are still sent (to nothingness). Is this behavior somehow different from appium?
On the other hand, https://api.flutter.dev/flutter/flutter_driver/FlutterDriver/tap.html has the duration (which we have not implemented in appium-flutter-driver), which can be solved for your use case, e.g.
driver.elementClick(buttonFinder, {durationMilliseconds: 100})
On the other hand, https://api.flutter.dev/flutter/flutter_driver/FlutterDriver/tap.html has the duration (which we have not implemented in
appium-flutter-driver), which can be solved for your use case, e.g.driver.elementClick(buttonFinder, {durationMilliseconds: 100})
I think driver.elementClick(buttonFinder, {durationMilliseconds: 100}) will solve my problem.
Currently, I have used below code snippet to declaring MobileEelment:
MobileElement buttonFinder = find.byValueKey("button"); buttonFinder.click();
If an element is not present on the screen or supplied the invalid locator, driver gets struck and deleting the session after 12 minutes.
MobileElement buttonFinder = find.byValueKey("button");
@truongsinh Ideally, driver should throw an exception if it doesn't get the element by the given locator in the above line.
Make sense, I put it as next enhancement
Any news ? 😁
hi is there any update on this
Any update of this?