Find Elements By Accessibility Id

schedule Jun 14th 02:45 - 03:05 PM place Grand Ball Room 1 people 2 Interested

You'll find many written sources which assert that AccessibilityId is the preferred selector to use for finding elements, but why is this the case? What's wrong with XPath?

In this talk, we will discuss Accessibility Id's in depth. How Appium uses them to find elements on iOS, Android, and web, and how developers add these Id's to apps. We will specifically focus on the performance impact of using XPath selectors instead of Accessibility Id's.

We will demonstrate techniques we can use to improve the performance of XPath selectors if accessibility Id's are missing, and discuss strategies for convincing managers and app developers to add accessibility Id's to the apps we automate.

 
1 favorite thumb_down thumb_up 2 comments visibility_off  Remove from Watchlist visibility  Add to Watchlist
 

Outline/Structure of the Talk

Part 1: Using and working with accessibility Id's:

We will start with a demonstration of the Accessibility features provided by iOS and Android devices, giving testers a feel for accessibility on mobile devices. We will explain the different ways that mobile app developers add accessibility Id's to the elements in their apps. We will then go over the underlying automation frameworks that Appium uses to find elements using accessibility Id's.

Part 2: A comparison to XPATH

We will talk about why Accessibility Id's are preferable to XPath selectors. We will look at some performance statistics for the time it takes to query by XPath, and discuss how easily XPath selectors are broken by app and platform version changes.

Part 3: Working with what we have

Having an app conveniently filled with accessibility Id's isn't always an option. In this section, we will discuss strategies for convincing managers and app developers to add accessibility Id's to their apps. We will also go over some techniques for improving XPath selectors by using them together with accessibility Id's.

Learning Outcome

Attendees will learn what it feels like to use an app with accessibility controls, how developers can add these to apps, how to ask developers to add accessibility Id's to apps, and how to improve the speed of their test suites using selectors appropriately.

Attendees will gain an appreciation for avoiding XPath selectors except when necessary.

Target Audience

Testers who want to improve test suite runtimes, make tests less brittle, or convince managers and app teams to include accessibility Id's

Prerequisites for Attendees

Attendees should already be familiar with writing and running Appium tests.

schedule Submitted 3 months ago

Public Feedback

comment Suggest improvements to the Speaker
  • Pooja Shah
    By Pooja Shah  ~  1 month ago
    reply Reply

    Hi Jonah,

    Thank you, glad to see your submission. Can you please share some reference slides for the content. 

    And i'm curious to know how do you plan to relate your demo(s) with a generic audience?

     

     

     

    • Jonah Stiennon
      By Jonah Stiennon  ~  1 month ago
      reply Reply

      Thanks for asking Pooja,

      For relating to a generic audience: I've felt that many of us spend so much time testing devices, we sometimes forget how people use their devices day-to-day. Accessibility is a big topic, but I was going to start by demonstrating what it is like to use an iOS app with accessibility controls, and then an Android app. Once the manual interaction is explained, the "accessibilityId" selector should make more sense.

      After that, the rest of the talk will focus on why XPath selectors are less convenient than AccessibilityId. I plan on demonstrating a sample test that is slow with XPath but fast with AccessibilityId. Plus, XPath is brittle when apps change. I think I could demonstrate these ideas to a diverse audience that doesn't need to know anything too specific about one platform, or the programming involved in the tests.

      The part of the talk where I talk about ways to convince managers and app developers to include accessbility Ids should be applicable to any QA team.

      Was there anything specific which concerned you?

      Is this explanation detailed enough? I haven't created the actual slides yet. I was thinking screenshots of AndroidStudio and XCode that show what it looks like when a developer adds an accessibilityId to an element. Another slide would be graphs of the time a test takes with XPath instead of AccessibilityId selectors. Another slide would have an audio recording of Acessibility assistance on Android and iOS apps.


  • Justin Ison
    Justin Ison
    Sr. Software Engineer
    Applitools
    schedule 4 months ago
    Sold Out!
    45 Mins
    Demonstration
    Beginner

    In today’s agile world the time to market is becoming increasingly shorter. There is a constant desire to release ASAP to keep ahead of the competition and to please users with updated/new features. Because of this, we have less time to fully do manual and exploratory testing of our apps. Especially, when you consider all the combinations of OS's, Locales, Accessibility, Orientations & Resolutions apps support. Running anywhere from 1 to 100's of Appium crawler bots (covering all of those combinations) at once we can discover more issues quickly and efficiently without having to write a line of code.

    UI Automation also has its limitations as it only tests for expected results. Crawler bots test the unexpected, by collecting metadata such as logs, app strings, screenshots, memory and reporting back it’s finding for review so we can test all these combinations quickly and more efficiently. In this talk, I will go over the current challenges we face in today's development world, why we need more tools to help us keep pace, and cover how you can build your own Appium crawler.

    I've open sourced this tool and is available here for everyone to use: https://github.com/isonic1/Appium-Native-Crawler

  • Liked Bruno Alassia
    keyboard_arrow_down

    Bruno Alassia - Go beyond the software, automate hardware scenarios on Android Emulators

    Bruno Alassia
    Bruno Alassia
    Sr. Software Engineer
    SauceLabs
    schedule 4 months ago
    Sold Out!
    45 Mins
    Talk
    Intermediate

    Explore the limits Appium can help you achieve to control the Android Emulator behavior. Automate network emulation, receive fake SMS and phone calls, change the battery states and levels and a lot more, all using real-life test cases. What happens to my app if I lost connection? How does my UI react to an incoming phone call? And more.

  • Liked Bijoya Chatterjee
    keyboard_arrow_down

    Bijoya Chatterjee - Trust Issues with UI Automation

    45 Mins
    Talk
    Beginner

    UI Test Automation is notorious for stability issues. UI automation is almost synonymous with "Flaky Test". We discuss taking a proactive strategy towards test automation flakiness as opposed to a reactive approach where we look at failures and then decide the course of action. How can we in the test automation community use and develop tools that helps eliminate flakiness and also identifies flaky tests before they are not just run but even before they are merged. How do we create these tools in a service model that plugs into our Continuous Integration pipelines ?

  • Liked Rajdeep
    keyboard_arrow_down

    Rajdeep - There is more in Espresso Driver's Element than you think

    Rajdeep
    Rajdeep
    Sr. Test Automation Engineer
    Badoo
    schedule 3 months ago
    Sold Out!
    45 Mins
    Demonstration
    Intermediate

    Have you been in a situation when some cases are impossible to test because Appium doesn't have support? Appium is improving continuously and release of espresso-driver is an example of this.
    There are a lot of capabilities in this driver, one of which is the ability to call platform methods on elements via backdoor without modifying Application under test. This opens the door of infinite possibilities. What it means is, if the Android platform supports some actions or properties on an element, then Appium will support it out of the box.
    For an automation engineer, that's a very powerful addition. I was fortunate enough to work on this feature and would like to showcase what are the various tricky cases where this feature can be applied. There will be real examples shown with a sample android app. I will also introduce one more small bonus feature at the end, about flashing elements on screen ;)

  • Liked Tomer Cohen
    keyboard_arrow_down

    Tomer Cohen - Low-level android automation with adb

    45 Mins
    Talk
    Beginner

    When we speak about Android automation, the first thing that comes to mind is Appium, however, what if Appium doesn't serve all your Android automation needs, at least not in the most efficient way?

    When I was asked to create a test automation framework for our android service (no GUI), I needed to choose the right tool for the mission. After several weeks of researching many options (both commercial and open source). I realized that ADB is my best call because of the following reasons:
    • ADB provides a faster to run solution for controlling an android device
    • ADB is in a lower level of Android OS therefore it's more flexible
    • ADB is going through less code components (like appium client, appium server etc..) and as a result is more reliable

    In this tutorial I will share my journey towards deciding to use Android Debug Bridge when it comes to non-gui android application and how I have implemented my choice.
    After this tutorial, you will have a better understanding of what is ADB, how it works, and how you can start and apply automation for the Low-Level layer of Android OS with ADB and Python.

  • Liked Eran Kinsbruner
    keyboard_arrow_down

    Eran Kinsbruner / Uzi Eilon - Future-Proofing Testers in the Age of AI, ML, and Bots

    45 Mins
    Talk
    Advanced

    We're all hearing the buzzwords of AI, machine learning, chatbots, and next-generation testing. Does this mean that the days of traditional testing as we know and practice it are over? Eran Kinsbruner doesn't think so. Join him to learn about the clear transformation happening toward smarter testing techniques and tools. These approaches will drive better pipeline efficiency and release velocity with high quality, and Eran thinks this means good things for the testing practice and practitioners. You'll discover the key trends that are happening around AI, machine learning, and bots in the web and mobile landscapes, and get the ability to identify some early adopters who are taking the lead in these domains. Learn some key requirements and skills that are required for a test engineer to shift toward the future of automation, as well as the changes testers will need to undergo in order to become future leaders in this space.