Builder tutorials

From QAliber

Jump to: navigation, search

QAliber Builder tutorials will take you through some of the strong features, and will show you how you can automate over Desktop and Web without writing single line of code.

Google Maps automation

This hands-on will take you through Web automation of Google maps without writing a single line of code, using the controls and Image Test Cases available in the repository on first installation.
In this scenario we'll:

  • Launch Internet Explorer & navigate to Maps.google.com.
  • Search for the grand canyon. (HTML automation)
  • Click the info balloon (Image automation)
  • Search for Direction instructions.
  • Go into street view

Highlights for this scenario:

  1. Web automation.
  2. Use Control Locator with regular expression.
  3. Automating with images.


Reminder: Web automation supports only Internet Explorer and can automate and run 1 tab at a time.
The scenario for this tutorial available for download from here I suggest you'll download and work with it through out this tutorial.

Let’s see how the scenario was built.First 3 steps for the scenario simply bring us to Google maps. Parameters:


1) Start Process: Simply start IE and navigate the google maps URL

      a.  Process = IExplore
      b.  Arguments = http://maps.google.com

2) Change Window State: We are about to use image automation, I want to make sure the IE window is maximized.

      a.  Control = Select the IE window using the  Control Locator,  leave the default UIAutomation selected since you want to capture the Window and not HTML element inside the page. 

Note: By default the name of the control contains the page name:

Desktop.UIA[@" <Page name> - Windows Internet Explorer", @"IEFrame", @"UIAWindow"] You want to replace this since the page name is different on other machines. Use the regular expression index: Desktop.UIA[@"Windows Internet Explorer", @"UIAWindow",true] See our Wiki about more ways to special identify a control.

     b.  Operation = Maximize (combo selection).



In the next steps we use the Control Locator with Internet Explorer selected, locating HTML elements and work with the controls.


3) Wait for control parameters:

     a.	Control = google maps logo. the HTMLImage (Internet Explorer selected on Control locator).
     b.	Timeout = 10000. In milliseconds, wait 10 seconds.

4) Send Keystrokes. Parameters:

     a.	Control = To the location search box (Desktop.Web.CurrentPage.FindByID("INPUT", "q_d") 
     b.	Keystrokes = grand canyon az

5) Click Mouse Parameters

     a.	Control = search Maps - Desktop.Web.CurrentPage.FindByID("INPUT", "q-sub") 
     b.	Button = Left.
     c.	Coordinate = 46,8 (~middle of the button)




Using Images, next 2 steps use the Image automation to find and click on control.


The image engine is highly sensitive and will always find image as long you make sure its unique and visible. You can automate with images on 1 machine and be sure the same automation will work on another machine, regardless of Monitor, Graphic accelerator setting and etc’.

6) Wait for image. Waits for the info balloon image simply to make sure page complete loading and control available.

     a.	Image file = path to InfoBallon.bmp (    should be in this sample zip)
     b.	Timeout = 10000, 10 seconds.

7) Click on Image. To open the info tip balloon.

     a.	Image file = path to InfoBallon.bmp (    should be in this sample zip)
     b.	Button= Left.

Next steps repeats actions we did up on different controls, I’ll sum them up and you can see the attached script and run it to see how they work.


8) Wait for Control: wait for the info balloon tip to pop
9) Click mouse: Click on Direction.
10) Send keyboard – set direction from to tuba city
11) Click mouse – on get direction.
12) Wait for control – the direction route item.
13) Click mouse - on route item.
14) Move mouse- to Google street view control (hover)

Thats it, were done, you can use our [| Help forums] with any question you might have regarding this scenario, or any other question you might have. Check out this wiki section for more tutorials.

Personal tools