Forum Discussion
tristaanogre
15 years agoEsteemed Contributor
TestComplete will not "ask" during execution but there are all sorts of ways to achieve the same deal in the code you write before execution.
For example, in the code you posted, you could replace it with
Sys.Process("PowerUserU").Window("#32770", "BCME * PU").Window("Button", "OK").Keys("[Enter]");
and it will work both for your old version as well as for your new version and for any version afterwards, assuming the caption of the window is always within that particular pattern.
Now, as for "teaching" TestComplete, TestComplete has a similar feature to QTP's "object repository". TestComplete calls it "NameMapping" in which you can define objects for use in the tests by a set of criteria that uniquely identifies the object.
As a good introduction to this, especially as regards objects that have certain dynamic properties, watch the following video.
http://smartbear.com/support/screencasts/testcomplete/reliable-tests-for-dynamic-objects/
For example, in the code you posted, you could replace it with
Sys.Process("PowerUserU").Window("#32770", "BCME * PU").Window("Button", "OK").Keys("[Enter]");
and it will work both for your old version as well as for your new version and for any version afterwards, assuming the caption of the window is always within that particular pattern.
Now, as for "teaching" TestComplete, TestComplete has a similar feature to QTP's "object repository". TestComplete calls it "NameMapping" in which you can define objects for use in the tests by a set of criteria that uniquely identifies the object.
As a good introduction to this, especially as regards objects that have certain dynamic properties, watch the following video.
http://smartbear.com/support/screencasts/testcomplete/reliable-tests-for-dynamic-objects/