Forum Discussion
The HoverMouse can hover on the screen at any coordinate and not necessarily fail nor accomplish any results. Double check your provided x, y coordinates values accuracy.
From the log you are viewing the details of both steps and are providing you coordinates. I also suggest you view the Picture tab to see where TestComplete actually Hovered Or Clicked.
You are trying to click the right of the cell, is that the right thing to do? I would think you need to click the resizable divider between the cells.
- JDR25002 months agoFrequent Contributor
Thanks for the feedback. The hover position/coordinates are correct. The screen capture I provided was taken from the actual results by putting a breakpoint at the double-click line. I snapped the screenshot while execution was paused before attempting to execute the double-click.
Additionally, I added the HoverMouse strictly for debugging this problem. It was not intended to accomplish anything other than show me where TC mapped my x/y coordinates. My expectation being that if those were the correct coordinates when hovering they should also be correct for the double-click.
The log contains no pictures for either entry. That tab is blank.
The hover position in the screen capture is indeed where I wish to double-click. Double-clicking that border has the effect of adjusting the column width to fit the text. It's the same behavior you get in Excel. I think the terms "border" and "divider" are effectively interchangeable in this scenario.
- Hassan_Ballan2 months agoFrequent Contributor
Your statement "The log contains no pictures for either entry. That tab is blank. " is interesting and perhaps your starting point to investigate. I suggest you use the recorder to record your actions.
I used web application in browser to record and play such KeywordTests and converted to code. Booth scripts play nicely and I do capture pictures.
- JDR25002 months agoFrequent Contributor
I've taken a different approach and it's working. Since the hover is in the correct position, I get the screen coordinates of the mouse cursor at that point. Then I double-click on the screen coordinates relative to the application rather than the column header object. That's double clicking in the desired place.
Set o_colHdr = <Alias to column header here> i_Width = o_colHdr.Width i_Height = o_colHdr.Height x = i_Width y = i_Height/2 o_colHdr.HoverMouse x, y x = Sys.Desktop.MouseX y = Sys.Desktop.MouseY Aliases.Sys.Ezp.Session.DblClick x, y
I think the original problem is probably a bug with the DblClick method. Something with coordinates relative to an object vs. the screen. However, rather than pursuing that with support I'll go with my workaround.
Thanks for all your feedback.
Related Content
- 9 years ago
- 8 years ago
Recent Discussions
- 9 hours ago
- 7 days ago
- 10 days ago