0

The auto-increment feature is causing one of the test scripts to fail. How can I modify the script or disable the auto-increment function?


e.g. It looks like this:

Window("Flight Reservation").WinMenu("Menu").Select "File;Fax Order..."
Window("Flight Reservation").Dialog("Fax Order No. 95").WinObject("Fax Number:").Type "1111111111"  
Window("Flight Reservation").Dialog("Fax Order No. 95").WinButton("Send").Click

How can I disable the auto-increment to read the fax order no.95, instead of it being incremented every time? Thanks in advance!

  • What do you mean? What is "auto-increment feature"? – Alexey R. Dec 6 '18 at 9:04
  • I think @Danny has misunderstood the issue - the problem is not that the Fax Order number in the dialog title increments, it's that the object he has learned into the OR has static text for the title property and so can't match the object once the fax order number increases on the next iteration of the run. – Dave Dec 6 '18 at 15:07
1

Your issue is that the Object Repository has learned this object with a title or caption including the number (95) which increments.

The solution is to change the property in the Object Repository to a regular expression which will allow the title/caption to match on the parts which are static, so if you have

"Fax Order No. 95"

As your Title property for the Dialog object belonging to the Window Flight Reservation, click the edit button on the end, mark the item as a Regular Expression with the checkbox and change the value to

"Fax Order No.*"

Which will match any Dialog objects belonging to the Window which begin with the title text "Fax Order No"

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.