Forum Discussion
Generally, this means that something has changed in the identification of the object. For us to help you diagnose better we need to see.
1) The code you're attempting to run
2) A screenshot of the Mapping criteria for TGroupButton including the hierarchy
3) The "Additional Info" from your error message on the object not found
4) A screenshot of the Advanced Properties of button from your Object Browser.
function OneTimeFeeTypes()
{
Aliases.B6.MainForm.MainMenu.Click("[8]|[10]|[17]|[0]");
//// View
Aliases.B6.MainForm.MDIClient.ListOneTimeFeeTypes.ViewBtn.Click(18, 15);
Aliases.B6.DialogOneTimeFeeTypes.CancelBtn.ClickButton();
//// Add
Aliases.B6.MainForm.MDIClient.ListOneTimeFeeTypes.AddBtn.Click(11, 19);
Aliases.B6.DialogOneTimeFeeTypes.edDescrip.Keys("ტესტკომპლიტ");
Aliases.B6.DialogOneTimeFeeTypes.edDescripLat.Click(34, 12);
Aliases.B6.DialogOneTimeFeeTypes.edDescripLat.Keys("testcomplete");
Aliases.B6.DialogOneTimeFeeTypes.lcbProductCategories.Click(339, 16);
Aliases.B6.DialogOneTimeFeeTypes.lcbProductCategories.Keys("[Down][Enter]");
Aliases.B6.DialogOneTimeFeeTypes.rgAppCard.TGroupButton.ClickButton();
// Aliases.B6.DialogOneTimeFeeTypes.rgAppCard.TGroupButton2.ClickButton();
Aliases.B6.DialogOneTimeFeeTypes.clbOpType.Click(444, 15);
Aliases.B6.DialogOneTimeFeeTypes.clbOpType.Keys("[Down][Down][Down][Down][Down][Down][Down][Down][Down][Down][Down][Down][Enter]");
Aliases.B6.DialogOneTimeFeeTypes.OKBtn.ClickButton();
//// Change
Aliases.B6.MainForm.MDIClient.ListOneTimeFeeTypes.EditBtn.Click(13, 21);
Aliases.B6.DialogOneTimeFeeTypes.edDescrip.Keys(GetRandomGeorgianText(5) + "[Tab]");
Aliases.B6.DialogOneTimeFeeTypes.edDescripLat.Keys(GetTranslatedTextToEng());
Aliases.B6.DialogOneTimeFeeTypes.rgAppCard.TGroupButton.ClickButton();
Aliases.B6.DialogOneTimeFeeTypes.OKBtn.ClickButton();
//// View
Aliases.B6.MainForm.MDIClient.ListOneTimeFeeTypes.ViewBtn.Click(18, 15);
Aliases.B6.DialogOneTimeFeeTypes.CancelBtn.ClickButton();
Aliases.B6.MainForm.MDIClient.ListOneTimeFeeTypes.Close();
}
here is my code fragment.
when I record new script, there is the same TGroupButton Mapping criteria.
there is new code fragment:
function Test1()
{
var dialogOneTimeFeeTypes = Aliases.B6.DialogOneTimeFeeTypes;
var TDBRadioGroup = dialogOneTimeFeeTypes.rgAppCard;
var groupButton = TDBRadioGroup.TGroupButton;
groupButton.ClickButton();
var groupButton2 = TDBRadioGroup.TGroupButton2;
groupButton2.ClickButton();
groupButton.ClickButton();
groupButton2.ClickButton();
var txDBLookupCombo = dialogOneTimeFeeTypes.clbOpType;
txDBLookupCombo.Click(448, 12);
txDBLookupCombo.Keys("[Down][Down][Down][Enter]");
groupButton.ClickButton();
var txDBMemo = dialogOneTimeFeeTypes.mmSQL;
txDBMemo.Click(59, 70);
txDBMemo.Keys("4564");
}
- tristaanogre5 years agoEsteemed Contributor
The additional info gives us the clue. The problem is not with TGroupButton it's with what is showing as VCLObject("rgAppCard"). I'm guessing that this is a timing issue. There's an activity that you are doing in your main code before you call that GroupButton click. I'm guessing that's waht creates the "rgAppCard" object. So, this is a matter of making sure that there is sufficient code waiting for the objects to appear before they are utilized. TC 14 has had some object identification improvements over TC 12 which has improved efficiency of the processing. So, this might be a matter of TC 14 running FASTER than TC 12 and therefore objects are not created in time.
As a test, put an aqUtils.Delay(2000) right before you call to click the button. if this works, then that means you need to re-write your code a bit for a better timing or increase your Default timeout.
- TanyaYatskovska5 years agoSmartBear Alumni (Retired)
Thanks for the help, tristaanogre.
temo25, was the issue resolved? Please share the solution with us.
- temo255 years agoOccasional Contributor
I try Delay(2000) and also sleep(2000) before the TGroupButton, but result is the same.
After that I record new script for groupButtons and paste it over the old groupButtons click.
It works.
After that I comment second line (second groupButton click) and remove the comment mark an old groupbutton click and it works also.
Aliases.B6.DialogOneTimeFeeTypes.rgAppCard.TGroupButton.ClickButton();
// Aliases.B6.DialogOneTimeFeeTypes.rgAppCard.TGroupButton2.ClickButton();
Aliases.B6.DialogOneTimeFeeTypes.rgAppCard.TGroupButton2.ClickButton();I'm am very confused what to do.
Agree you that TC14 is faster than TC12, but I think this is not problem about that case.
How can I increase default timeout?
- tristaanogre5 years agoEsteemed Contributor
As mentioned, from the error, the problem is with the rgAppCard and is most likely a timing issue. Rewrite your code as follows.
var appCardObj = Aliases.B6.DialogOneTimeFeeTypes.WaitAliasChild('rgAppCard', 5000)
if (appCardObj.Exists) {
appCardObj..TGroupButton.ClickButton();
}
else {
Log.Error('regAppCard object does not exist')
}
And report the results.
- temo255 years agoOccasional Contributor
The main problem is that every groupButton in my code (and there is a lot in it) has the same problem.
stops and when I reRecord script and fill it in code, it works, but there isn't any change by the view.
In the old version, I had not these problem and now I should rewrite new code because of this problem, I think
Related Content
- 8 years agomadhuri_kn
- 8 years agoclay
Recent Discussions
- 7 hours agoSvetaG