Can't click on another tab without coordinates defined
Hi all,
I'm new to TestComplete and learning the tool myself. I am automating Desktop application. To start with, my approach is to create Keyword Tests for the scenario and then convert it into script which normally contains coordinates for 'Click' actions. I don't want the dependency on the coordinates in my scripts, so sometimes when I remove them from the scripts, the automated scripts fails ( not always).
For eg in below screen, in my keyword tests I'm clicking on 'Ledger Codes' which has coordinates (661,30) but when I remove them the script fails. I've tried using object spy to spy on the Ledger Codes tab but the Testcomplete can't spy on that particular ' Ledger Codes' tab. I've attached name mapping as well for reference. Is there any way I can click on Ledger tab without depending on coordinates please?
What you have written, using VCLObject, that ideally should have worked.
I've noticed, that each of your tabs have numbers which you can select using ALT + number.
You should be able to do something like, Sys.Process("Finance").VCLObject("dlgGLsetup").VCLObject("pnForm").VCLObject("tnbGLSetup").Keys("~1"); to select Fund Codes tab.
Note, in my previous example, the line
Aliases.Finance.dlgGLsetup.pnForm.tnbGLSetup.pageFundCodes.Click(); // name mapping
is based on having a name mapping for pageFundCodes.