Not reachable element can be clicked (during a msg errorbox)

Bug reports.
DonRaul
Posts: 2
Joined: Thu Feb 10, 2011 6:19 pm
Contact:

Not reachable element can be clicked (during a msg errorbox)

Post by DonRaul » Fri Feb 11, 2011 3:03 pm

In our application errors will be displayed in a message box. For example if you try to save a record with the same content, you get a message box which allows you only to click on the "OK"-Button of this message box at this moment. Other actions are not possible in this situation.

In my test recording I defined a click on the breadcrump and a validation on the text of the element with the name of the street (sdfBST_Strassenname). This two actions take place after saving the record.

As the expected error appears in the message box, now ranorex will try to continue the following test steps:
1. clicking on the BreadCrumb (element = BreadCrumb_0) and
2. validating the text of the element 'sdfBST_Strassenname'

In both cases ranorex studio execute this 2 test steps without an error reporting. In case of the text validation i can imagine how it works, but in case of the mouse click it doens't make sense: The element (BreadCrumb_0) is visible but not reachable for a user at this moment. There should be an error reported in the ranorex rxlog-File.

Please watch the last 5 steps after the saving step ('IsagClient.Global.Buttons.pbSpeichern') in the attached rxlog-File.. :D

Using Ranorex Version 2.3.8.10854, our application is written with C# with Visual Studio 2010 and WPF.
You do not have the required permissions to view the files attached to this post.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Not reachable element can be clicked (during a msg errorbox)

Post by Support Team » Fri Feb 11, 2011 9:28 pm

DonRaul wrote:The element (BreadCrumb_0) is visible but not reachable for a user at this moment. There should be an error reported in the ranorex rxlog-File.
In fact, the element "BreadCrumb_0" is reachable for a human user, i.e. you can click on that item with your mouse - the application just not reacts to it.

Ranorex does the same thing when you invoke the Click() method on the "BreadCrumb_0" element: It simulates a mouse click on that element just like a human user would do it and the application will indeed receive the mouse click - it just does not react to it, since a modal dialog is open. As there is now way for Ranorex to know a priori whether the application should have reacted to that click or not, you have to add a validation action that checks whether the application did react to the click.

This is true for every mouse or keyboard action you simulate using Ranorex. You always have to check the outcome of your actions using validations - just like a human user checks that the application does in fact react to his inputs.

Regards,
Alex
Ranorex Team