GithubHelp home page GithubHelp logo

Comments (3)

NickAb avatar NickAb commented on May 26, 2024

There is a general problem with visibility determination and clicking.

The problem with visibility is that there are quite a few properties that affect visibility and there is no clear and simple API to get if element is actually visible, even IsOffscreen automation property does not work correctly in some basic situations.
The problem with clicking is in the fact that it us two-step operation: InnerServer, embedded into the app, determines coordinates for clicking and sends them over the wire to Driver to actually click it. This might result in driver clicking into wrong point, as element could have changed its position due to animations. Also we do not check directly if element is clickable, we just try to obtain a point inside element bounds that is visible on screen.

I think we should do the following or at try to research it:

  • Use touch injection API to simulate touches on phone side, instead of doing them on host side (from driver), removing the need to pass coordinates over the wire and reducing chance of errors due to delay.
  • Ensure that exception is raised if there is no clickable point.
  • Research how we can improve and simplify visibility determination algorithm.

Also here are some docs on IsHitTestVisible https://msdn.microsoft.com/en-us/library/system.windows.uielement.ishittestvisible(v=vs.110).aspx

from winium.mobile.

ole-vegard avatar ole-vegard commented on May 26, 2024

Another issue I have come across is when using AppBarButton. The AppBarButton gets places inside an AppBar or CommandBar. It seems that if you use the Page.BottomAppBar, the AppBar gets placed outside the Page control. It is placed nside a Grid with opacity set to 0. This causes the IsUserVisible to report anything inside that AppBar as not visible.

When iterating up the view hierarchy from the AppBar, I never hit the actual Page it belongs to, so it's unlikely that this is something we set ourselves. And even if we do set it ourselves somewhere, it's still visible so the function should return true.

I have implemented a function that iterates up the hierarchy until it hits the parent AppBar and checks if that's visible. I can post a pull request if desired.

from winium.mobile.

NickAb avatar NickAb commented on May 26, 2024

Pull requests are welcome! It will also help me to better understand the problem and reproduce it. It would be especially nice if you could provide a test that will fail on current master build and will work after PR is applied.

from winium.mobile.

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.