Reputation: 23
I'm using Pycharm with Python 2.7. I'm trying to automate a test.
The AutoItLibrary is included and I can run Notepad for example. But I'm having some problems with the included documentary.
My script so far:
Run notepad.exe
ControlSend "Unbenannt - Editor", "", "Edit1", "Test Text."
Send ENTER
Sleep 1
WinClose "Unbenannt - Editor"
But I'm getting this error on the ControlSend
keyword:
com_error: (-2147352561, 'Parameter not optional.', None, None)
How can I fix this?
Upvotes: 0
Views: 1224
Reputation: 386030
Robot keywords uses two or more spaces between arguments, not commas. Also, you do not need to add quotes. You can use ${EMPTY}
to represent an empty string.
Your script should look like this:
Control Send Unbenannt - Editor ${EMPTY} Edit1 Test Text.
Upvotes: 2
Reputation: 116
not sure but the help file of AutoIt states this https://www.autoitscript.com/autoit3/docs/functions/ControlSend.htm Not sure what PY has wrapped around this function
Upvotes: 0