AutoItLibrary: Control Set Text

598 views
Skip to first unread message

teegee

unread,
Oct 10, 2016, 5:08:54 PM10/10/16
to robotframework-users
Hi,

I'm trying to populate some controls in a windows application using AutoItLibrary.
When I fire up Au3Info I get the following information:


I tried two things, neither of which work:

*** Variables ***
${SelcalGeneratorTitle}    Selcal Test Waveform Generator V3.1

*** Test Cases ***
Test Selcals
    Control Set Text    ${SelcalGeneratorTitle}    ""    [CLASS:TkChild;INSTANCE:47]    8
    Control Set Text    ${SelcalGeneratorTitle}        [CLASS:TkChild;INSTANCE:47]    8

The first one appears to be working but the value in the control doesn't change.
Documentation:

method ControlSetText

Start / End / Elapsed:20161011 10:04:34.885 / 20161011 10:04:34.896 / 00:00:00.011

The second one is throwing an error: com_error: (-2147352561, 'Parameter not optional.', None, None)

What am I doing wrong?

Cheers,
  Tom

Jayson Sparrow

unread,
Oct 11, 2016, 9:28:42 AM10/11/16
to robotframework-users
The second one is throwing an error because you did not supply a value in it which is mandatory field.

Try using ${EMPTY} variable in control_set_text second parameter

Message has been deleted

teegee

unread,
Oct 11, 2016, 9:20:18 PM10/11/16
to robotframework-users
Thanks Jayson.
Unfortunately, that doesn't make it work either.

Phuong Nguyen

unread,
Oct 12, 2016, 6:30:09 AM10/12/16
to robotframework-users
you should follow that : 


Message has been deleted
Message has been deleted

teegee

unread,
Oct 12, 2016, 7:07:29 PM10/12/16
to robotframework-users
Ok, I tried this:

*** Variables ***
${SelcalGenerator}    selcal_generator_v3_1.exe

${SelcalGeneratorTitle}    Selcal Test Waveform Generator V3.1
${NumberOfTonesElement}    TkChild47
${NumberOfTones}    8

*** Keywords ***
Start SelcalGenerator
    AutoItLibrary.Run    ${SelCalGenerator}
    Wait for Active Window    ${SelcalGeneratorTitle}
    Control Set Text    strTitle=${SelcalGeneratorTitle}    strText=${EMPTY}    strControl=${NumberOfTonesElement}    strControlText=${NumberOfTones}

Still not working.
 

Cheers,
  Tom

teegee

unread,
Oct 20, 2016, 10:02:18 PM10/20/16
to robotframework-users
I blame the application. Must not be compatible. I can get it to work with others
Consider this fixed
Reply all
Reply to author
Forward
0 new messages