User Guide
Version v3.6.0

Example: Opening Windows Settings from the Start Menu

In the previous example we created an Alyvix test case consisting of a single test case object. Most of the time though, you’ll need to chain together multiple test case objects to synthesize more complex behavior in your apps. So let’s extend our previous example to run a second action: opening the Windows Settings app.

  1. Launch Alyvix Editor with the same file name from our previous example:

    C:\Alyvix\testcases> alyvix_editor -f start-test
    

    Editor will load the start-test.alyvix test case created in the previous example.

  2. We need to capture the screen once the Start menu has already opened, so change the delay number in Delay [sec] 0 from 0 to something higher like 5, then click on ADD:

    Setting up the 5 second delay before capturing the screen
  3. Once you click ADD, you’ll have 5 seconds to open the Windows Start Menu (you’ll need to click on the Start button yourself in that time) before Alyvix captures the screen.

  4. After the screen flashes white, press Escape to return to screen capture mode, and then right click on the Settings icon at the left side of the Start Menu. This will autocontour the icon.

    Select Settings after the 5 second screen capture delay
  5. Press Escape again to return you to Editor with the new selection in the Designer panel at the right. Assign a left click action as in the previous example by changing the value of the Action dropdown from None to Click:

    Select Settings after the 5 second screen capture delay
  6. In the Selector panel at the bottom left, change the name of our new test case object from VisualObject1 to a new one like PressSettingsIcon:

    The settings button test case in Alyvix Selector
  7. Using its icon seen above, drag the new test case object into the Scripting panel underneath the existing script element (similarly, clicking the lineadd-icon icon will add it to the end of the script):

    The settings button script element in Alyvix Editor
  8. Now call Alyvix Robot by pressing the runblue button at the top left. You’ll see the Start Menu open, and then a few seconds later a click on the Settings icon, at which point the Windows Settings app will open.

  9. At the top of Editor, open the Console panel. This contains the timing results for each script element.

    The results of running the script in Alyvix Editor

    Finally, save and exit Alyvix Editor using the SAVE and EXIT buttons at the top.