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

Addition to #545 #546

Merged
merged 10 commits into from
Dec 27, 2016
Merged

Addition to #545 #546

merged 10 commits into from
Dec 27, 2016

Conversation

SrinivasanTarget
Copy link
Member

@SrinivasanTarget SrinivasanTarget commented Dec 25, 2016

Change list

  • Added Tests for iOS XCUIT mode.
  • Gradle publish tasks are updated

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)

@TikhomirovSergey FYI

@SrinivasanTarget
Copy link
Member Author

@TikhomirovSergey I see this is first time javadoc task is running in Travis job :) Its because of javadoc task refractor in build.gradle file :)

@TikhomirovSergey
Copy link
Contributor

@SrinivasanTarget The travis build is failed

@SrinivasanTarget
Copy link
Member Author

SrinivasanTarget commented Dec 25, 2016 via email


import java.io.File;

public class AppXCUITTest extends BaseIOSTest {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍


@iOSXCUITFindBy(className = "XCUIElementTypeSlider")
private MobileElement slider;

Copy link
Contributor

Choose a reason for hiding this comment

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

@SrinivasanTarget
Everything is ok. But I think coverage could be enhanced. There is no case like

@iOSFindBy(id = "someId")
private MobileElement foundLikeIOSId;

because I think some locators (like "id") are compatible with both modes. It similar to the test of the selendroid mode.

@TikhomirovSergey
Copy link
Contributor

@SrinivasanTarget Everything is ok but could you provide one more test as it was mentioned in remarks?

@SrinivasanTarget
Copy link
Member Author

SrinivasanTarget commented Dec 25, 2016 via email


@iOSXCUITFindBy(className = "XCUIElementTypeSlider")
private MobileElement slider;

Copy link
Contributor

@TikhomirovSergey TikhomirovSergey Dec 25, 2016

Choose a reason for hiding this comment

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

@SrinivasanTarget
Also you could add this test

@iOSFindBy(iOSAutomation = "some searching script")
@iOSXCUITFindBy(iOSNsPredicate = "some predicate") //it should be used for the searching instead of 
//@iOSFindBy
private MobileElement foundByScript;

Copy link
Member

Choose a reason for hiding this comment

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

@SrinivasanTarget @TikhomirovSergey when we initialize IOSDriver and provide the XCUITest as AutomationName only this case will it pick the iOSXCUITFindBy ?

Copy link
Contributor

Choose a reason for hiding this comment

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

@saikrishna321 When there is only java @iOSFindBy then it will be used.

When there are

@iOSFindBy
@iOSXCUITFindBy

then java @iOSXCUITFindBy will be preferred. Selendroid mode works the same way.

Copy link
Member

Choose a reason for hiding this comment

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

@TikhomirovSergey it works that way in Selendroid, coz the automatioName is set to selendroid. It should be the same here as well, if the automatioName is set to XCUITest only then @iOSXCUITFindBy should be preferred. Thoughts ?

Copy link
Member Author

@SrinivasanTarget SrinivasanTarget Dec 26, 2016

Choose a reason for hiding this comment

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

@saikrishna321 Yes you are correct. Btw for iOS10 automationName is not mandatory, server will set automatically even if you have given platformVersion.

Copy link
Contributor

@TikhomirovSergey TikhomirovSergey Dec 26, 2016

Choose a reason for hiding this comment

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

@saikrishna321 I can't get...

It is designed the same way as java @AndroidFindBy/java @SelendroidFindBy. It was designed this way because it is possible that old automation for iOS <= 9.3 and the new automation should be supported by one test scope.

The algorithm:

@iOSFindBy
@iOSXCUITFindBy

if you run new mode then

@iOSXCUITFindBy

is used. If you use legacy mode then

@iOSFindBy

is used instead.

@iOSFindBy

is used by both modes.

@iOSXCUITFindBy

is used by the new mode. If you launch legacy mode then page object tools create

ByIdOrName

The same works for Android/Selendroid.

So what the concern?

Copy link
Member

Choose a reason for hiding this comment

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

@TikhomirovSergey no concern, well explained. Cheers

@TikhomirovSergey
Copy link
Contributor

@SrinivasanTarget
There is one more remark

@SrinivasanTarget
Copy link
Member Author

Codacy is GREEN now. Will try to fix travis.

@TikhomirovSergey
Copy link
Contributor

@SrinivasanTarget Yes. Everything is ok. Please get build successful

@SrinivasanTarget
Copy link
Member Author

@TikhomirovSergey Yeah Sure.Its weird. I don't see travis running our command. Command works locally fine.

@SrinivasanTarget
Copy link
Member Author

@TikhomirovSergey Travis is GREEN now. Its running our commands now. Moved it to run under container based infra.

@SrinivasanTarget
Copy link
Member Author

@TikhomirovSergey TikhomirovSergey merged commit 6fa95e0 into appium:master Dec 27, 2016
@SrinivasanTarget SrinivasanTarget deleted the TikhomirovSergeyXCUITFindBy branch February 25, 2017 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants