Giter Site home page Giter Site logo

Comments (6)

jlipps avatar jlipps commented on May 13, 2024

In Appium-land, get element by name should really be thought of like get element by ID---names are taken to be unique since they are unique labels given to UI elements by the developer inside xcode. thus it doesn't make sense to get multiple elements by name. but:

  • I'm not sure why we get by "name" rather than "ID" in this case. @sourishkrout you worked on this, any thoughts?
  • Even if this is the way things have to stay, it seems like "name" is confusing since it doesn't imply uniqueness when that is what we really want it to mean.

from appium.

bootstraponline avatar bootstraponline commented on May 13, 2024

it doesn't make sense to get multiple elements by name

It does. I have multiple Sign In buttons and I want to click the second one. I had to implement it like this. Appium finds the sign in button on the background window in addition to the foreground.

from appium.

sourishkrout avatar sourishkrout commented on May 13, 2024

@jlipps: that's not quite right. The accessibility label doesn't have to be unique at all. That's the reason I choose not to use the get element by ID variant of element discovery form the WDJP spec.

It's even a little bit more messy. Apple choose to use the caption (e.g.) to pre-populate the element's name() but will overwrite it with the accessibility label if set in xcode.

I'm currently working on the get elements by name implementation. Stay tuned. Will also invest some time today to document all this.

from appium.

jlipps avatar jlipps commented on May 13, 2024

Great, thanks for setting me straight, look forward to the upcoming changes.

from appium.

sourishkrout avatar sourishkrout commented on May 13, 2024

Get elements by name is ready to go... Working on the documentation part of it right now.

from appium.

lock avatar lock commented on May 13, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from appium.

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.