This is part two of of a seven-part blog series. Care to go back to the beginning?

Last blog post, we reviewed installation and setup. For this one, let's write a simple mobile automation test, for this app, then investigate all mobile elements involved, with Appium Desktop.

Our Basic Test:

What to Call the Pages?

When we fire up the application, we are greeted by a screen called "API Demos". Would that be a good name for this page?

Probably not. If you tap on the Text menu item, it is also called "API Demos". Hrm... how to tell the two pages apart? How about we call the first page, the Home Screen Page, and the second page, the Inner API Demos Page?

After selecting the LogTextBox menu item, we are taken to a page titled "Text/LogTextBox". Let's call it the "Log TextBox" page.

Each and every page we interact will be treated as its own Java object for easy reference. This is called the Page Object Model.

What is the Page Object Model?

Home Screen Page

We get to this page by launching the app, then investigating the action bar "API Demo".

Remember that the leftmost panel is a reflection mirroring what is on the app. If you fire up the app, the first page (which we are dubbing the "Home Screen Page") is displayed. Is it not showing up in Appium Desktop? Select the "Refresh" button.

Properties of the Action Bar:

Properties of the Text menu item: Inner Api Demos Page

We get to this page after launching the app: LogTextBox Page

We get to this page by: Header: id: android:id/action_bar

ADD button: id = accesibility = "Add"

The panel is id = "io.appium.android.apis:id/text".

We have all we need!

Ready to start coding up our automated test?

... One more thing we need to cover: How the heck do we launch an app on our emulator using Appium?

Come back here tomorrow to find out!
[null, null, {"document_url": "http://www.tjmaher.com/2017/05/basic-appium-framework-part-two.html", "unformatted_src": "https://3.bp.blogspot.com/-dWVZPLA2ZYo/WRTXwtvD8mI/AAAAAAAALxg/2w8JwZYYG6chDF-78V_nHuYoi_yxwrmowCLcB/s640/5.%2BLogTextBox.png", "src": "https://3.bp.blogspot.com/-dWVZPLA2ZYo/WRTXwtvD8mI/AAAAAAAALxg/2w8JwZYYG6chDF-78V_nHuYoi_yxwrmowCLcB/s640/5.%2BLogTextBox.png"}, null, {"document_url": "http://www.tjmaher.com/2017/05/basic-appium-framework-part-two.html", "unformatted_src": "https://2.bp.blogspot.com/-ljC1FphSw3I/WRTYIvIAjJI/AAAAAAAALxo/c-EDaxhomIA702e15Za2q4ktUp_6kMtNACLcB/s640/6.%2BText%2BArea.png", "src": "https://2.bp.blogspot.com/-ljC1FphSw3I/WRTYIvIAjJI/AAAAAAAALxo/c-EDaxhomIA702e15Za2q4ktUp_6kMtNACLcB/s640/6.%2BText%2BArea.png", "rendered_width": 640, "rendered_height": 368}, null, null, null, null, null, null, null, null]