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..
Using Ranorex Version 184.108.40.20654, our application is written with C# with Visual Studio 2010 and WPF.
2 posts • Page 1 of 1
- rxlog of the recording NotReachableElement
- (3.27 KiB) Downloaded 151 times
- Printscreen of the application with the to items (IsagClient.Global.BreadCrumb.BreadCrumb_0) and (IsagClient.Strassen.mdifrmStrasse.sdfBSTR_Strassenname)
- UnreachableElementMessageBox.png (127.56 KiB) Viewed 1133 times
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.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.
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.