Mouse click not proper
I am using Test complete for desktop application testing.
While recording in the grid view, click on particular cell and edited the value. But Playback is run It is selecting different cell.
how to make it click on proper cell and edit the value.
Solved! Go to Solution.
Use this function to click on Grid, just modify a little bit according to the property of your grid
I have posted the overview of clickGrid function .
Para 1 : Grid - Object of the Grid
Para 2: Column name you want to click in
Para 3 : Cell Value to click
function FindRow(Grid, Column, Value, ViewId)
if (typeof(ViewId) == "undefined")
ViewId = 0;
for (var i=0; i<Grid.wRowCount(ViewId); i++)
if (Grid.wValue(i, Column, ViewId) == Value)
RowIndex = FindRow(Grid,Column,Value);
if (RowIndex != -1)
Log.Message("Row index: " + RowIndex + " Column Name: " + Value);
Log.Error("Row was not found");
Mouse click problem occurs only in flex grid.
For the data grid in the application scroll bar set and mouse click correctly click the grid cell
But for the Flex grid in the application the scroll bar is set ,grid is unchanged and mouse click for different cell.
For the data grid unit script have this:
And for Flex grid the unit script is :
VBFlexGridWndClass.VScroll.Pos = 6
How can this be solved?
I was able to solve this issue by using the page down key. In my example the grid value I needed to edit was at the bottom of the page. I paged down until the value was in view and then made the edit. This allowed the grid in view to have the exact same setup every time. Only problem with this is if the grid changes (values added or removed) you will need to update your script.
@zarcher thank you for sharing your solution! This will potentially help a lot of people!
Community and Education Specialist