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!

New contributor
Danny is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

put on hold as unclear what you're asking by Alexey R., trashpanda, Milin Patel, Nitin Rastogi, Bharat Mane 18 hours ago

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • What do you mean? What is "auto-increment feature"? – Alexey R. Dec 6 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 at 15:07

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"

New contributor
Dave is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

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