New Page Object Actions in Ranorex Webtestit


As many of you have probably learned so far, Ranorex Webtestit is more than just a code editor. You can use it to write your tests, of course, but the primary goal is to use Webtestit’s features to quickly create your tests without much boilerplate coding.
One of the most prominent features is the one related to the Page Object actions. The actions are created to help you save on the amount of code you need to write when defining your Page Objects, without losing anything of your tests’ robustness or reliability.

The Page Object actions we featured in the new version of Ranorex Webtestit (1.4.0) will make things even easier.
These actions are based on popular Selenese commands and work with a simple drag and drop gesture, followed by choosing the desired command from the drop-down list.

We introduced the following Page Object actions which are available from the pop-up menu in Ranorex Webtestit:

  • Do
  • Perform mouse
  • Element by index
  • Get
  • Is
  • Is not

To view all actions available in Ranorex Webtestit, please refer to our User Guide.

Here’s how you can quickly create a Page Object action:

  • Locate the Elements tab in an active Page Object
  • Drag the element you want to base your action on, into the Code tab
  • Release the mouse at the spot you want to insert the new method
  • From the pop-up menu, select the action you want the method to be based on
  • Ranorex Webtestit will create a method reflecting the action.
  • You can continue to edit the action freely or drag more elements into the newly generated method.

And that’s the whole thing.
As you can see, you don’t have to bore yourself to death by writing a boilerplate code all over again, when Page Object actions in Ranorex Webtestit can help you set your tests in just a few clicks. :wink: