You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,29 +22,29 @@ We use interfaces where is possible, so you can implement your own version of ta
22
22
<dependency>
23
23
<groupId>com.github.aquality-automation</groupId>
24
24
<artifactId>aquality-appium-mobile</artifactId>
25
-
<version>LATEST</version>
25
+
<version>${LATEST_VERSION}</version>
26
26
</dependency>
27
27
```
28
28
29
-
2. Configure path to your application at settings.json:
29
+
2. Configure the path to your application at settings.json:
30
30
- Copy [settings.json](./src/main/resources/settings.json) into the resources directory of your project.
31
31
- Open settings.json and find `applicationPath` option under the `driverSettings` section of desired platform. Replace the value with full or relative path to your app, e.g. `./src/test/resources/apps/ApiDemos-debug.apk`.
32
32
33
33
3. Ensure that [Appium server](https://appium.io) is set up at your machine where the code would be executed, and the address/port match to set in your `settings.json` in `remoteConnectionUrl` parameter.
34
34
If the parameter `isRemote` in your settings.json is set to `false`, this means that AppiumDriverLocalService would be used to setup Appium server using Node.js. This option requires specific version of node.js to be preinstalled on your machine (Please read more [here](http://appium.io/docs/en/contributing-to-appium/appium-from-source/#nodejs) )
35
35
36
36
4. (optional) Launch an application directly by calling `AqualityServices.getApplication();`.
37
+
37
38
> Note:
38
39
If you don't start an Application directly, it would be started with the first call of any Aquality service or class requiring interacting with the Application.
39
40
40
41
5. That's it! Now you are able work with Application via AqualityServices or via element services.
41
42
Please take a look at our example tests [here](./src/test/java/samples/)
42
43
43
44
6. To interact with Application's forms and elements, we recommend following the Page/Screen Objects pattern. This approach is fully integrated into our package.
44
-
To start with that, you will need to create a separate class for each window/form of your application, and inherit this class from the [AndroidScreen](./src/main/java/aquality/appium/mobile/screens/AndroidScreen.java) or [IOSScreen](./src/main/java/aquality/appium/mobile/screens/IOSScreen.java) respectively.
45
-
46
-
> We recommend to use separate Screen class for each form of your application. You can take advantage of inheritance and composition pattern. We also suggest not to mix app different platforms in single class: take advantage of interfaces instead, adding the default implementation to them if is needed.
45
+
To start with that, you will need to create a separate class for each window/form of your application, and inherit this class from the [Screen](./src/main/java/aquality/appium/mobile/screens/Screen.java).
47
46
47
+
> We recommend to use separate Screen class for each form of your application. You can take advantage of inheritance and composition pattern. We also suggest not to mix app different platforms in single class: take advantage of interfaces instead, adding the default implementation to them if it is needed.
48
48
49
49
7. From the Screen Object perspective, each Screen consists of elements on it (e.g. Buttons, TextBox, Labels and so on).
50
50
To interact with elements, on your form class create fields of type IButton, ITextBox, ILabel, and initialize them using the `getElementFactory()`. Created elements have a various methods to interact with them. We recommend combining actions into a business-level methods:
@@ -77,7 +77,6 @@ public class InvokeSearchScreen extends AndroidScreen {
77
77
return lblSearchResult.getText();
78
78
}
79
79
}
80
-
81
80
```
82
81
83
82
8. We use DI Guice to inject dependencies, so you can simply implement your MobileModule extended from [MobileModule](./src/main/java/aquality/appium/mobile/application/MobileModule.java) and inject it to `AqualityServices.initInjector(yourModule)`.
0 commit comments