Forum Discussion

meenakshiyadav1's avatar
meenakshiyadav1
Contributor
11 years ago

Alternative way to Drag and Drop an object from one place to other.Drag method of test complete not working

can anyone please suggest an alternative method for Drag n droping an object from one place to another. Drag method  of test complete is not working for me . I am getting error that "There was an action performed at point(354,318) which is ot of window bound.". I am not able to resolve this
  • james_attree's avatar
    james_attree
    Occasional Contributor
    Have you confirmed that the object you wish to drag is infact at those co-ordinates?
  • Hey james,  I am actually calculating the position of the object with the help of  script my script only.It should be correct position. Is there a way to confirm it?



    Below is the script I have written: (Object to be dragged = GrpLink, Destination= DragdropPanel)





    XPos = GrpLink.ScreenLeft+GrpLink.Width/2


    YPos = GrpLink.ScreenTop+GrpLink.Height/2



    set DragdropPanel=



     



    Aliases.IeIms_BR.Dashboard_PG.IMSframe_FM.Progress_PN.RptDatatabstrip_PN.RptDatatabstrip1_PN.Reportgrid_PN.DragDrop_PN





     



    dX = DragdropPanel.ScreenLeft-GrpLink.ScreenLeft+DragdropPanel.Width/2



    dY = DragdropPanel.ScreenTop-GrpLink.ScreenTop+DragdropPanel.Height/2



    DragdropPanel.Click



    GrpLink.Drag XPos,YPos,dX,dY,skNoShift





    Additional info in Log: The window size is (249, 29); screen rectangle: the left top corner is (230, 304), the right bottom corner is (479, 333). The screen coordinates of the point is (584, 622).





    As per my script Xpos comes as= 354.5

    YPos=318.5

    dx=435

    dy= - 16