Search code examples
pythonwindowsautomationrobotframeworkautoit

Control Click in Robotframework-AutoItLibrary do nothing


I have this script in AutoIt and it works just fine. When coding in Robotframework, the same line is not working. There is no error and the test pass the execution sucessfully but the click is not executed.

In AutoIt Script (OK):

ControlClick("Win Title","","[CLASS:ToolbarWindow32; INSTANCE:1]", "", 1, 255, 20)

In RF (NOK):

Control Click   Win Title    ${SPACE}    [CLASS:ToolbarWindow32; INSTANCE:1]     ${SPACE}    1   255     20

I tried with ${EMPTY} and the behavior is the same.

If I remove the last parameters (1 255 20) it works but clicks on the wrong button (middle of the toolbar). With only the parameter 1 do not works.

Any ideas? Thanks.


Solution

  • I think is missing one argument (button LEFT). This way it works:

    Control Click  strTitle=Title  strText=  strControl=[CLASS:ToolbarWindow32; INSTANCE:1]    strButton=LEFT  nNumClicks=1  nX=255  nY=20