How to set properties to track valid button

Ask general questions here.
supriya
Posts: 1
Joined: Wed Feb 27, 2019 7:26 am

How to set properties to track valid button

Post by supriya » Wed Feb 27, 2019 8:23 am

Hi Team,
In my automation test case there is one step where the message displays for saved data(After click on save button). Unfortunately, On same step I got error.As the expected saved message window and the exception/Error message window is same automation result shows success in result.The step is to click on 'OK' button.Kindly help me and give me solution to set properties so that in future it should not occur.Please find attached images for your reference.
Attachments
Expected window.jpg
Expected window(Saved message window)
Expected window.jpg (9.59 KiB) Viewed 66 times
Exception Window.jpg
Exception/Error window
Exception Window.jpg (9.54 KiB) Viewed 66 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 4772
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to set properties to track valid button

Post by odklizec » Wed Feb 27, 2019 9:00 am

Hi,

Please upload a Ranorex snapshot (NOT screenshot) of "Data saved successfully" message box. Screenshot is unfortunately not helpful for determining reliable xpath. Generally speaking, you should associate the "OK" button with "Data saved successfully" message. Unfortunately, without seeing the snapshot of given message box, there is no way for me, or anyone else here, to provide such xpath.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

manish
Posts: 23
Joined: Fri Aug 10, 2018 12:46 pm

Re: How to set properties to track valid button

Post by manish » Wed Feb 27, 2019 9:48 am

Hi,

As Pavel already mentioned it is difficult to help with the Ranorex xpath without the sanpshot of the window. As an alternative, you can make a check on the Success or Exception message. Incase, the sucess message appears, you can clikc on OK and porceed and if the exception occures, you can try to handle the exception according to your needs. Or you can ask your developers to change the text on OK button to Cancel and then you can base your testcase on the button text.

Thanks
Manish