Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add class chain locator type for iOS XCUITest-based driver #599

Merged
merged 2 commits into from
Mar 22, 2017

Conversation

mykola-mokhnach
Copy link
Contributor

Change list

Adds a new class chain locator type for iOS XCUITest-based driver

Types of changes

What types of changes are you proposing/introducing to Java client?
Put an x in the boxes that apply

  • No changes in production code.
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Details

This PR is based on appium/appium-xcuitest-driver#391
Class chain locator description and usage examples are present on https://github.com/facebook/WebDriverAgent/wiki/Queries

@mykola-mokhnach
Copy link
Contributor Author

I'd be very happy if one could provide me with xml source of the app we use for functional iOS testing, so I could add some tests for class chain locator type.

@SrinivasanTarget
Copy link
Member

Interesting. @mykola-mokhnach TestApp is available in our repo, you can use the same and add some tests.

@SrinivasanTarget SrinivasanTarget added this to the 5.0.0 milestone Mar 13, 2017
@mykola-mokhnach
Copy link
Contributor Author

Done. Functional tests have been added

@SrinivasanTarget
Copy link
Member

cool @mykola-mokhnach Will review in sometime

Copy link
Member

@SrinivasanTarget SrinivasanTarget left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Thanks @mykola-mokhnach

Copy link
Contributor

@TikhomirovSergey TikhomirovSergey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TikhomirovSergey
Copy link
Contributor

@SrinivasanTarget Are tests passed? I would like to publish it in BETA6.

@SrinivasanTarget
Copy link
Member

Yes @TikhomirovSergey Its a merge away

@himankarbn
Copy link

@mykola-mokhnach @SrinivasanTarget: Need some help... So far we have been using XCUITest for our automation. We recently started with Appium Ruby and would like to use class_chain locator type strategy but we are having some trouble with it. Here is a the sample tree of our login screen
screen shot 2017-09-06 at 10 12 14 am

In XCTest to get the Password text field we use table.cells.containing(.staticText, identifier:"Password").children(matching: .secureTextField).element

Is there a better/shorter way to find the password field using class_chain ?
find_elements(:class_chain, 'XCUIElementTypeWindow/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeTable/XCUIElementTypeCell[3]/XCUIElementTypeStaticText')[0]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants