Forum Discussion
Try with the below code, it can loop for any possible button with Yes in the screen and it will click on it.
var PropArray = new Array("WndCaption", "Visible");
var ValuesArray = new Array("Save As", true);
var SaveAsWindow = Sys.Process("Application Name").FindChild(PropArray, ValuesArray);
if (PrintDoc.Exists)
{
SaveAsWindow .btnYes.Click()
}
else
Log.Error("The object was not found.");
YOu're only using the caption and whether or not it is visible... there are more properties to choose from than that.
Use the Object Spy and examine the popup dialg for other property/value pairs. There may be a WndClass or something else you can use as well. As I said, you'll need to examine the properties of the object to determine the differentiation.
- Marsha_R6 years agoModerator
Are you trying to test the replace or could you just delete that file when you are finished with it each time and avoid the replace altogether?
Related Content
- 6 years ago
- 6 years ago
Recent Discussions
- 22 hours ago
- 22 hours ago
- 5 days ago