This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Not able to click on object using TextClick. its clicking below the required object. SilkTest OpenAgent.

FV.FindControl("[@windowClassName='AfxFrameOrView100'][4]").TextClick("0603: Request created from . Double-click to assign asset.", 1, CT_LEFTDOUBLE)

Here not able to identify that Object with regular scanning or Recording.

do we have any examples to provide coordinates in TextClick

Tags:

  • 0

    if i use FV.FindControl("[@windowClassName='AfxFrameOrView100'][4]").DoubleClick(MB_LEFT, 28, 74) its performing the operation but the popup is not opening but Result  showing as Run Passed in Tool

  • Suggested Answer

    0   in reply to 

    Hi  

    With regards to the TextClick method not working, have you validated that the text can be captured from the object in question?

    • Print(FV.FindControl("[@windowClassName='AfxFrameOrView100'][4]").TextCapture())

    If the desired text is returned, the TextClick method should click the center of the text specified. If the click is not working, you can try using TextRectangle to return the location of the text and then use low-level event to perform the double click operation.

    With regards to the DoubleClick, can you try performing a MoveMouse prior to the DoubleClick. It's possible the event is being fired too quickly resulting in the incorrect replay behavior. For example:

    • FV.FindControl("[@windowClassName='AfxFrameOrView100'][4]").MoveMouse(28,74)
    • Sleep(1)
    • FV.FindControl("[@windowClassName='AfxFrameOrView100'][4]").DoubleClick(MB_LEFT, 28, 74)

    Regards
    Robert

  • 0 in reply to   

    Hi Robert, Thanks for quick reply.

    • Print(FV.FindControl("[@windowClassName='AfxFrameOrView100'][4]").TextCapture()) able to provide correct info, But by using below steps. its clicking on the required area but popup is not opening.
    • FV.FindControl("[@windowClassName='AfxFrameOrView100'][4]").MoveMouse(28,74)
    • Sleep(1)
    • FV.FindControl("[@windowClassName='AfxFrameOrView100'][4]").DoubleClick(MB_LEFT, 28, 74)

    if i record the TC im getting like below, here also popup is not invoking

    FV.FindControl("[@windowClassName='AfxFrameOrView100'][4]").TextClick("0603: Request created from . Double-click to assign asset.", 1, CT_LEFTDOUBLE)

    i have seen that we can provide coordinates in TextClick too right, but im not able to get full syntax with example. 

  • 0   in reply to 

    Hi  

    The follow code should demonstrate how to perform a TextClick with coordinates:

    • MyObject.TextClick("Demo Text", 1, CT_LEFTDOUBLE, NULL, {5,5}, NULL)

    If the double click (via TextClick or DoubleClick) still does not work, I'd recommend opening a support case so we can have a look at the issue.

    Regards
    Robert