Added You.i Engine Support by pfoster-youitv · Pull Request #429 · appium/java-client

The first remark is related to checkstile issues.
The way how to keep the code style was described there: https://github.com/appium/java-client/blob/master/docs/Note-for-developers.md#code-style

Answer: We ran the StyleChecker before but it looks like it wasn't run for the last few commits.

1) It seems there is lack of new functions. Are any other features going to be added? Is there a new searching engine? How does the searching by accessibility id feel with it?

Answer: The ‘new’ functionality this provides is a unified API that test writers can code against. The reason this feature is important is because most, if not all apps written by our users target multiple platforms (We are a cross-platform engine.) Apps that target the same form factor (iOS and Android handsets and tablets for example) will be indistinguishable from a testing perspective. As for new features, for now we need to catch up on the functionality already provided in other drivers. You can find a full list of currently supported commands here: https://github.com/YOU-i-Labs/appium-youiengine-driver.
Where accessibility is concerned, apps built with YouiEngine historically have not been accessible. Unfortunately there is a lack of demand for an accessible video playing app. While we do plan to fix this as we expand into other types of apps it is not currently a feature developers are requesting.

2) I do not like that the one AppiumDriver subclass has commands for both iOS and Android. It looks like AppiumDriver looked two years ago. It was containing features for both iOS and Android. It was causing confusions and errors. There were any other things. So I and @Jonahss decided to split it to AndroidDriver and IOSDriver. But the problem is not completely resolved. There is an issue: #398
We (I'm and @SrinivasanTarget) are going to make:
the abstract AppiumDriver:
the abstract AndroidDriver and the abstract IOSDriver which will extend the AppiumDriver;
AndroidAutomatorDriver and SelendroidDriver which will extend the AndroidDriver;
IOSAutomationDriver and XCUITDriver (when it will be completely available) which will extend IOSDriver;
New youi engines could be included to the new hierarchy conveniently. What do you think?

Answer: A You.i Engine app is developed from a single code-base and deployed to multiple platforms on which it is almost identical in appearance and behaviour. This allows our users to use the same tests across multiple platforms. To facilitate this we would like to provide a single driver API across multiple platforms. Under the hood we will use the existing iOS and Android drivers whenever possible.
After discussing the implementation internally we arrived at the same conclusion. We should split the iOS and Android specific code into separate classes. We typically bridge functionality across platforms by splitting the implementation into pieces one for each platform and one for common code which also delegates to the platform specific implementations e.g.
YouiEngineDriver (The current class)
YouiEngineDriverIOS (A IOSDriver subclass which the YouiEngineDriver delegates to)
YouiEngineDriverAndroid (A AndroidDriver subclass which the YouiEngineDriver delegates to)
YouiEngineDriverIOS and YouiEngineDriverAndroid would only be instantiated if the platformName was iOS or Android and would provide the same API so that the YouiEngineDriver could always call the corresponding method on the delegate driver.
Regarding your planned changes to the class hierarchy, we look forward to them. Providing a single API for multiple platforms will be much easier if the separate implementations share a base class, and hopefully, an interface.

3) I have not tried to run the proposed code. But I'm sure that it may not work because these commands are not included to the MobileCommand repository.
https://github.com/appium/java-client/pull/429/files#diff-ce6f39a92ea9fa433bdd2f3f2945f427R79
https://github.com/appium/java-client/pull/429/files#diff-ce6f39a92ea9fa433bdd2f3f2945f427R106
and some other

Answer: Right, we did have issues with these commands. We will clean this up.

1.Add AppiumServiceBuilder in tests.

Answer: OK, we will do that

2.I see lot of commented codes here in tests which needs to be removed. https://github.com/YOU-i-Labs/appium-java-client/blob/94992de7988fe9d0699d41a0400ff43e898869ed/src/test/java/io/appium/java_client/YouiEngine/SanityTest.java#L470

Answer: OK, we will do that

3.I suggest to document findBy strategies that appium-youiengine-driver supports.

Answer: OK, we will do that

4.Do we really need YouiEngineElement class, If so how is it gonna be different from MobileElement?

Answer: I think we just defined YouiEngineElement using AndroidElement or IOSElement as a template. Doesn’t look like we define anything into it... [Edit]: MobileElement is defined as abstract therefore we need to define YouiEngineElement...