Rapise - Using Button Objects

February 12th, 2015 by inflectra

rapise objects

Once you have learned objects with Rapise, it is time to use them, or modify how you use them. As a primary functional element, buttons are pretty ubiquitous. Submit, Calculate, etc… You push a button for most transactions. This article explains the different operations that can be performed with buttons during automated testing.

Overview of Buttons

The basic use of a button is to click on it to create some change or calculation to process either in the GUI or behind the scenes.

As stated, the basic function of a button is to be the target for a mouse click, however there are several other ways to interact as well. Some buttons have states, up or down, some react differently with left or right click. Some are activated through keystrokes, I could go on but you get the gist, there are several ways to interact with a button.

Rapise Button Commands

Rapise provides for these methods through the various commands available to buttons:

  • DoAction()
    Performs default action for an object. In the case of buttons the default is typically a Left Click. If a technology library does not have a default listed Rapise will default to Left click
  • DoAnalogPlay (path to recording,left of analog area,top of analog area)
    Plays a previously recorded analog recording using coordinates relative to this object.
  • DoClick(clickType, xOffset, yOffset)
    If the parameters are left blank Performs left click at the center of an object. Parameters for click type and offset can be added to alter what kind of click (L, LD,M, MD, R, RD, N) or the offset from the top leftmost point of the object
  • DoEnsureVisible()
    Checks to see if the object is visible on the screen.
  • DoLButtonDown()
    Used after DoMouseMove to left click and hold. Make sure to close this with DoLButtonUp to avoid locking the mouse
  • DoLButtonUp()
    Closes the loop on DoLButtonDown. Use case would be for a click and drag. I.e. DoMouseMove -> DoLButtonDown -> DoMouseMove -> DoLButtonUp.
  • DoLClick(x,y)
    By default Performs a left click at the center of an object. With x and y parameters added it will click with the offset from the top left of the object.
  • DoLDClick(x,y)
    By default Performs a left double click at the center of an object or at the specified location.
  • DoMButtonDown()
    Same as DoLButtonDown but with the Middle mouse button
  • DoMButtonUp()
    Same as DoLButtonUp but with the Middle mouse button
  • DoMClick(x,y)
    Same as DoLClick with the middle button
  • DoMDClick(x,y)
    Same as DoLDClick with the middle button
  • DoMouseMove(x,y)
    Moves mouse cursor to a location relative to the defined objects position.
  • DoRButtonDown()
    Same as DoLButtonDown, but for the Right button. Same caveats apply.
  • DoRButtonUp()
    Same as DoLButtonUp, but for the Right button. Same caveats apply.
  • DoRClick(x,y)
    Same as DoLClick for Right Click.
  • DoRDClick()
    Same as DoLDClick for Right Click.
  • DoSendKeys(keys)
    Sends series of keystrokes to an object.

All these commands, and more, are contained in the help file with Rapise, or online at https://www.inflectra.com/Rapise/Documentation.aspx.

Using these commands you can perform a number of additional actions on an object, using them in sequence you can do even more. Keep these in mind as you are recording the test and you will be able to modify your process to meet the expectations of your test plan more effectively.

Spira Helps You Deliver Quality Software, Faster and with Lower Risk.

Get Started with Spira for Free

And if you have any questions, please email or call us at +1 (202) 558-6885

Free Trial