Example5. How to use Conditional Action

(Play Store App Example)

Let's create a scenario that changes the 'Category' to 'Role Playing' when the category of the current No. 1 game in the play store is not Role Playing. To do this you need to use the 'Store Content' action and the 'If Value' action.

Through this example, you can learn how to use 'Relative' function in the screen analysis tools, how to save and use sentences at a specific point on the screen, and how to write scenarios that operate according to conditions.

Step1. Turn on the Play store and go to the game menu among the menus at the bottom. After that, on the Top charts screen, the Category of the App, which is currently number one, is read and saved. The Category of the No. 1 app can be read using Relative among screen analysis tools.

Step2. Create a new step, select the Store Content action, and add the category part of the #1 app as a UIObject.

Step3. Click the step created above to activate the Attributes panel, then input "first_category" in the key field of Attributes.

Step4. Create a new step, select the If Value action, click the step to activate the Attributes panel, then enter first_category in the key field of Attributes. Select "!=" for comparator, and enter Role Playing for value.

When input as above, if the value stored in the first_category key does not match the character of Role Playing (first_category != Role Playing), the child step is executed.

Step5. As a child step of the If Value step, create a step that touches Categories and a step that touches Role Playing in the Categories selection window.

Step6. On the device connected to Stego, click Categories at the top of the play store, click All categories, and then run the steps you wrote from the beginning.

Last updated