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
common interface for android and ios #265
Conversation
@alizelzele Please update your PR. It needs to be able to compile. It looks like you are missing some files. Also, please squash your commits down to no more than 3 salient commits. Thanks! |
@alizelzele Also fyi, our commit comment format is as follows; Short description on a single line.
{empty line}
Detailed description. Can span many lines |
@alizelzele Was there no way to add the new android page objects functionality/needs into the existing app? How difficult would it be to do this? I'm trying to minimize confusion for anyone looking (developer, other) at our test apps.. To me, it is much less confusing to have one clear app for iOS and another for Android. At a minimum, can you give the new app a name (and corresponding top level directory) which better conveys the difference when compared to the pre-existing android page objects app? |
@kumaravel-jayakumar @fakrudeen78 @sundaramrajendran @sebady I'm going to need some help reviewing this one, please :) |
Note for reviewers: [X] @alizelzele covered by the CLA. CLA signed. |
@alizelzele Please correct your
Or contribution policy asks that you set your to fix this in your existing commits, you will have to amend your commits and reset the author |
@mach6 Sorry, i did not know where to answer to your comments, so i add a comment here. thank you. |
@Override | ||
public Map<String, String> getGuiMap(String locale, WebDriverPlatform platform) { | ||
return getGuiMap(locale); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we're ignoring platform param here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sebady from comment in com.paypal.selion.reader.YamlV1Reader(line 56), i figured out mobile platform does not need to be supported in yamV1 and i remember i saw somewhere yamlV1 is deprecated if i am not wrong. does it needs to support mobile platform?
@mach6 i changed the old test cases to work with the new android app and removed the old one. |
@alizelzele please do not update PageYaml V1.. Yes, it is deprecated (and undocumented) .. It will be removed in a future release. |
Hi @alizelzele fyi, I'm still waiting for your updates -- squashed commits, etc. cheers. |
@mach6 sorry i was waiting for review and comments before squashing them all to one. |
Thanks @alizelzele .. It makes it easier on the reviewer(s) when the changes are in a single (or 3 max) commits (and corresponding diffs) to go through each change.. It enables us to review them offline without also cross-referencing the output on github and the PR |
@mach6 It was a bit scary to force push to server, but it is done now. :-) |
@@ -111,8 +114,11 @@ public void setIosCustomElements(String[] elements) { | |||
public void setAndroidCustomElements(String[] elements) { | |||
androidCustomElements = Arrays.asList(elements); | |||
} | |||
|
|||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alizelzele don't worry about this one
@@ -111,8 +114,11 @@ public void setIosCustomElements(String[] elements) { | |||
public void setAndroidCustomElements(String[] elements) { | |||
androidCustomElements = Arrays.asList(elements); | |||
} | |||
|
|||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mach6 I amend commit the changes for code quality.
@@ -111,8 +114,11 @@ public void setIosCustomElements(String[] elements) { | |||
public void setAndroidCustomElements(String[] elements) { | |||
androidCustomElements = Arrays.asList(elements); | |||
} | |||
|
|||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're okay. you fixed them all but this one. this reports show it -- https://www.codacy.com/app/SeLion/paypal-SeLion/pullRequest?prid=212622
Please don't fix this one. You followed the pattern the file had here. So, we will make an exception
private static final String ACTION_BUTTON_LOCATOR = "com.paypal.selion.pageobjectsdemoapp:id/action_button"; | ||
private static final String LONG_PRESS_BUTTON_LOCATOR = "com.paypal.selion.pageobjectsdemoapp:id/long_press_button"; | ||
private static final String TEXT_VIEW_LOCATOR = "com.paypal.selion.pageobjectsdemoapp:id/long_press_button_output"; | ||
private static final String ACTION_BUTTON_LOCATOR = "com.symbio.pageobject:id/btnNext"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please make these all com.paypal.selion
@alizelzele will you please submit a PR for the doc updates that coincide with this PR's feature changes? Documentation is on the gh-pages branch. Thanks! |
@mach6 I changed all the parts you asked for except the documentation part. |
@alizelzele Thanks. The documentation will be needed though it will not prevent this PR from moving forward. This said, I'd like to minimize the gap between merging this PR and the documentation updates. So, if you could please start the changes on your |
1. adding a common interface for both android and ios objects 2. changing yaml reader and code generator to support new interface and yaml files. 3. add more elements to Android elements. 4. add parameters to config Mobile annotation parameters from suite and command line. 5. creating new android test app that match with ios test app to be able to test common interface. 6. adding test suites and test cases for testing common interface and updating old test cases to be able to work with new one.
* | ||
* @parameter expression="${selion-code-generator.mobileCustomElements}" | ||
*/ | ||
private List<String> mobileCustomElements; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alizelzele fyi, you will be impacted here in a minor way by #287 if/when it is merged.
We can fix when before we merge your PR.
@@ -0,0 +1,130 @@ | |||
package com.paypal.selion.mobile.sample.mobile; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a copy of the copyright
@alizelzele fyi - I'm working on this code. I have rebased / merged it with the latest changes on Here is the start of this work -- https://github.com/mach6/SeLion/commits/alizelzele-develop I might reach out to you for some more help. Hope that is okay! |
@mach6 Sure, let me know how i can be of any help. |
@alizelzele @sebady Moved this PR to the local branch https://github.com/paypal/SeLion/tree/alizelzele-develop for final readiness. Also opened #296 for further tracking/review |
As discussed in #259 , this is a fork for having a common interface for both Android and Ios.
this PR contains the changes required to do the job. this Pr contains the following changes:
1- adding a new android project to sample-apps which is more like the IOS sample app version for testing.
2- changing code generator to support new system and generate files according to new requirement.
3- creating new common elements interfaces and implementing them for ios and android.
4- changing yaml reader to be able to read new style of yaml files.
5- adding some config properties for selecting platform and setting MobileElement annotation parameters from test suite.
6- changing config builder to support selenium grid with multiple appium instances with diferent platforms.
7- adding some test cases and a suite for testing if new system works properly.
Please let me know if any other change is required.