Mouse click not proper
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 ClickGrid(Grid,Column,Value)
{
var RowIndex;
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)
return i;
return -1;
}
RowIndex = FindRow(Grid,Column,Value);
if (RowIndex != -1)
{
Grid.ClickCell(RowIndex, Column);
Log.Message("Row index: " + RowIndex + " Column Name: " + Value);
}
else
Log.Error("Row was not found");
}
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
WindowsForms10Window8app0141b42ar11ad1.MouseWheel(-11)
And for Flex grid the unit script is :
VBFlexGridWndClass.VScroll.Pos = 6
How can this be solved?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@zarcher thank you for sharing your solution! This will potentially help a lot of people!
Sonya Mihaljova
Community and Education Specialist
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the help i have been facing smilier issue,
