Coder Social home page Coder Social logo

click(), "flutter:enterText" methods not throwing exception when element not present or supplied invalid locators. about appium-flutter-driver HOT 8 OPEN

ahashmi24 avatar ahashmi24 commented on June 17, 2024
click(), "flutter:enterText" methods not throwing exception when element not present or supplied invalid locators.

from appium-flutter-driver.

Comments (8)

truongsinh avatar truongsinh commented on June 17, 2024 3

Make sense, I put it as next enhancement

from appium-flutter-driver.

ahashmi24 avatar ahashmi24 commented on June 17, 2024 1

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.

from appium-flutter-driver.

truongsinh avatar truongsinh commented on June 17, 2024

@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?

from appium-flutter-driver.

truongsinh avatar truongsinh commented on June 17, 2024

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})

from appium-flutter-driver.

ahashmi24 avatar ahashmi24 commented on June 17, 2024

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.

from appium-flutter-driver.

Rodaxfck avatar Rodaxfck commented on June 17, 2024

Any news ? 😁

from appium-flutter-driver.

sahil-innostax avatar sahil-innostax commented on June 17, 2024

hi
is there any update on this

from appium-flutter-driver.

Hassanajmalcowlar avatar Hassanajmalcowlar commented on June 17, 2024

Any update of this?

from appium-flutter-driver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.