Forum Discussion
mmkumaram
14 years agoOccasional Contributor
Thanks for the reply.
I tried recording the actions in TestComplete and I got the below script. When I click on Filter cell it generates "gridTableControl.Click(82, 56) ", as you said in previous posts it recorded using the co-ordinates. I am bit sceptical while using co-ordinates in my script. The Dialog which I use is not always constant, the screen size changes if the data is grouped and i guess this might affect the script. Also, We run our scripts in different platform, based on my experience the screen size tend to differ on machines and script fails to click on required object that we are looking for, so we avoid using Co-ordinates in our script.
var petrel;
var uiTabs;
var gridTableControl;
petrel = Sys.Process("Petrel");
uiTabs = petrel.CompletionsSpreadsheets_Design.WinFormsObject("tabs_");
gridTableControl = uiTabs.WinFormsObject("UiTabPage", "Completions").CompletionsSpreadsheet_Design.WinFormsObject("Panel", "", 2).splitContainer1.WinFormsObject("SplitterPanel", "", 1).grid_common_.WinFormsObject("gridTablePanel").tableControl1;
gridTableControl.HScroll.Pos = 18;
gridTableControl.VScroll.Pos = 65;
uiTabs.ClickTab("Completions");
gridTableControl.Click(82, 56);
petrel.WinFormsObject("PopupHost", "").WinFormsObject("GridDropDownContainer", "").WinFormsObject("GridComboBoxListBoxPart", "").ClickItem("G1B");
Thanks,
Muthu