Organizations rely heavily on their technology infrastructure to enable business growth. Software testing management is critical to ensuring that applications used by the workforce perform as intended and won’t break down when employees are in the middle of crucial...
Coordinate Recording Mode
The setting that defines this behavior is the Coordinate Recording Mode that can be found in Settings -> Recorder Defaults. This setting has three possible values: Pixel, None, and Proportional. This setting defines how the exact action spot within a UI element is determined. The default is Pixel. This setting records the exact location of a click within the UI element. For example, if you click on a button in recording mode near its top left corner, you will get small coordinate value like 5;8, since the top left corner always has the coordinates 0;0. These coordinates use integer values and will also be used for playback. The setting None behaves differently: Here, it doesn’t matter where on the element you click in recording mode, Ranorex will use the action spot Center and in playback will always click on the middle part of the button. The setting Proportional uses coordinates in the form of .5;.6, thus using floating point numbers instead of integers. This means that if you click on a pixel in recording mode that is 30% of the button size from the top, then in playback Ranorex will also click a pixel that is 30% from the top in playback mode.
Advantages and disadvantages
All three of these settings each have a set of disadvantages and advantages. In fact, None might seem to be the best setting, but Pixel is the default value in Ranorex.
This setting is the default in Ranorex. It recognizes the exact (=pixel-perfect) action spot in the UI element in recording mode and uses these coordinates for playback. This has one huge advantage: When running the test, Ranorex does exactly the same thing that you were doing when you recorded the test. At least as long as you stay on your same screen with the same screen resolution and the same screen scaling, that is. In modern applications, especially web applications, responsive design has become increasingly more important, and a button or a text field might change its size drastically, depending on the size of the application window, the screen, the device orientation, etc. For example, on the Amazon homepage, you might want to click into the search field, somewhere in the middle:
This setting works very differently, and it changes the behavior of the test run drastically compared to the recording. Every action spot is set to Center. This might sound as if it makes sense in many cases, especially when you have responsive design, but it has a few serious drawbacks. For example, consider you want to click on this headline on a web page:
This setting tries to, similarly to Pixel, retain the action spot exactly where it was while recording, but in relation to the size of the element. This means that a click on a spot that is 30% from the left edge and 60% from the top edge will also be done 30% from the left and 60% from the top in the test run, no matter how big or small the element now is. This mitigates the problem that the Pixel setting had: if a button shrinks, the action spot is still inside of the button. And some issues that None has are also solved, but still, Proportional suffers from similar issues. For example, a click here…
The Best Setting
So, the question is: What is the best setting for me? The answer is pretty unsatisfying: It depends on your application. Pixel is the default because we think that if you record a test and then run it afterward without changing anything in between, it should run. None does not have this property, and while None looks logical up to a certain degree, Proportional seems to do very illogical things if you don’t know how the action spot is calculated. Therefore, we have decided to stick with Pixel as the default. This is often best for pure desktop applications and works fine if you don’t change the screen resolution. None and Proportional both have their uses in applications with responsive design (mostly in the web and on mobile devices), however, they can have strange side-effects. In all three cases, depending on your actual UI element, it might be necessary to change the action spot manually if it doesn’t do what you want. There is no cure-all type of setting. All of them have advantages and disadvantages. If you know what properties those settings have, you can easily pick the one that suits your project best.
Having good software testing management can lead to business growth. Follow these 4 tips for a smooth management process.
Software quality is a core concern for all software developers, and it encompasses more than just the code. Here’s how to improve software quality in nine ways.
This is a helpful guide on how to reduce software testing times and the benefits of doing so. Check out these four tips to achieve more time-efficient testing.