Forum Discussion
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");
}
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
tristaanogre thanks for help. I try this and keep testing, so I tell step by step:
Aliases.B6.DialogCompanyAttribCodes.rbAttribType.TGroupButton.ClickButton();
Aliases.B6.DialogCompanyAttribCodes.rbAttribType.TGroupButton2.ClickButton();
Aliases.B6.DialogCompanyAttribCodes.rbAttribType.TGroupButton3.ClickButton();
Aliases.B6.DialogCompanyAttribCodes.rbAttribType.TGroupButton4.ClickButton();
Aliases.B6.DialogCompanyAttribCodes.rbAttribType.TGroupButton5.ClickButton();this is fragment of my code, which didn't work. after that I record one click on TGroupButton2 and don't paste instead of this. Delete also new record script.
Run an old fragment and TGroupButton2 works, but still not works other TGroupButtons.
Then record all five clicks on the buttons and immediately delete this record.
Old code works.
I think problem is an object before TGroupButton-s (in this case: rbAttribType), which TC should not find before new record script, even in that case if you immediately delete that new one.
Related Content
- 8 years agomadhuri_kn
Recent Discussions
- 3 days agovladd1