Synthuse / synthuse-src

Synthuse (Synthetic-User) is a portable java base software testing framework for desktop windows applications.
Apache License 2.0
6 stars 5 forks source link

refactorXPathMakerAndFixBug #3

Closed alexkogon closed 9 years ago

alexkogon commented 9 years ago

Hi Ed,

We would like to do more exact matching than the current verifyElementPresent action does to ensure that the text in a field exactly matches what is on the screen. To do so I am going to add another action, and modify the buildXpathStatement method to include the text element regardless of whether using an array index would give the unique element.

In preparation for doing so I refactored your method to include the max parent text and max text lenghts as parameters (they were hard coded to 20 and 30 respectively) and a boolean flag to add the additional text, if wanted. I left your code intact and made the original method a reference to the new one with the original values.

I also noticed that you were checking the length of the parentTxtOrig to choose whether to truncate the txtStr, which I assume was a copy/paste error.

Another pull request to add the action will follow, and perhaps more!

Cheers

Alex

ejakubowski commented 9 years ago

Hey Alex,

Looks like a good update to the method. I think your are right about the the copy/paste error. Good catch. Thanks!

alexkogon commented 9 years ago

No worries I make mistakes like that all the time; hopefully I am paired and have someone looking over my shoulder but often not!

I'm going to add another menu item today hopefully, will get started shortly; in general we're going to see what the fat client teams here need and see if we can resolve it for them with Synthuse.

This XML representation of the Windows is really cool, I'm hoping we can make it do what we want.

Be in touch