Can anyone help me how to use AutoIT library with RobotFramework+Selenium2Library

4,955 views
Skip to first unread message

Madhu

unread,
May 15, 2016, 11:26:37 PM5/15/16
to robotframework-users

Can anyone help me how to use AutoIT library with RobotFramework+Selenium2Library. Please help me with installation steps and one example.

I am using following versions Python 2.7.10 , robot framework 2.7.6  and my OS is win64. Please find screenshot in the attachment for error that i am getting.


Any help would be appreciated.


Thanks,
Madhu.



RobotFramework_AutoITlibrary.jpg

Hélio Guilherme

unread,
May 16, 2016, 6:59:45 AM5/16/16
to robotframework-users

Have you read the README.txt file?

About the error output, you should get it fixed by:
python setup.py install

Madhu

unread,
May 16, 2016, 8:49:17 AM5/16/16
to robotframework-users
Hi Helio,

   I have tried by python setup.py install but still I am getting error.

C:\AutoItLibrary-1.1\AutoItLibrary-1.1>python setup.py install
%SYSTEMROOT%\system32\regsvr32.exe /S C:\Python27\Lib\site-packages\AutoItLibrary\lib\AutoItX3.dll
Traceback (most recent call last):
  File "setup.py", line 70, in <module>
    subprocess.check_call(cmd, shell=True)
  File "C:\Python27\lib\subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '%SYSTEMROOT%\system32\regsvr32.exe /S C:\Python27\Lib\site-packages\AutoItLibrary\lib\Aut
oItX3.dll' returned non-zero exit status 5




Thanks,
Madhu.

Tatu Aalto

unread,
May 16, 2016, 8:59:58 AM5/16/16
to msraj...@gmail.com, robotframework-users

Ugh

Just came to my mind, that which is the problem that you are trying to solve with AutoIT? Perhaps there is other solution and perhaps it's better.

-Tatu

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.

MadhuSudhanaRaju

unread,
May 16, 2016, 9:06:51 AM5/16/16
to Tatu Aalto, robotframework-users
Hi Tatu ,
   
   I am trying to upload a file located in my windows laptop using AutoIT/RobotFramework/Selenium2library.

I have tried using Choose File command in selenium2library but I am getting error as File doesn't exist in local file system.I am not sure whether directory path is not considered or any other issue. Please give me valid code or any alternate solution.Any help would be appreciated.Following is the command I have tried.  

Choose file     xpath = //input[@firmware-upgrade='firmware']       C:\\Users\\mra001\\Downloads\\Cambium_Builds\\Falcon\\ePMP1000-Hotspot-2.5.1-b3.tar

Following is the other way that I have tried and it works fine but i think it is irrelevant.

***Settings***
Library  Selenium2Library


*** Variables ***
${Browser_Chrome}           Chrome
${Device_77_URL}        https://10.110.0.17
${Device_Path}          C:\\Users\\mra001\\Downloads\\Builds\\Gambit\\500-2.5.1-b3.img

*** Keywords ***


Software Update 
    Open Browser    ${Device_77_URL}    Chrome
    Input Text      id=Username  admin
    Input Text      password=Password    admin
    Click Button    xpath = //button[@type='submit']
    Wait Until Element Is Visible       //a[text()='Home']      20
    Click Link      xpath = //a[text()='Operations ']
    Input Text  xpath = //input[@firmware-upgrade='firmware']  ${Device_Path}
    Click Button        Upgrade Firmware
    Confirm Action
    Close Browser


Tatu Aalto

unread,
May 16, 2016, 12:23:57 PM5/16/16
to MadhuSudhana Raju, robotframework-users

Ugh

Based on your description the error is that the file was not found from the location where you did specify it be. To be sure, could you run the Choose File keyword with --loglevel trace option enabled and send the stack trace?

-Tatu

MadhuSudhanaRaju

unread,
May 16, 2016, 1:07:02 PM5/16/16
to Tatu Aalto, robotframework-users
Hi Tatu , 

  Whatever you said is right ,  It is unable to find file location . I have corrected my code and it works fine .

Choose file   id= templateImportFile C:\\Users\\mra001\\Downloads\\BUGS_Screenshot\\Config-77.txt

Attachment contains logs with loglevel trace enabled.


Thanks,
Madhu.
log.html

Clark

unread,
Jan 23, 2017, 6:45:30 PM1/23/17
to robotframework-users
Run cmd as administrator.

teegee

unread,
Jan 24, 2017, 1:30:18 AM1/24/17
to robotframework-users
You're getting this error because you're trying to run regsvr32.exe from a non-elevated prompt but it requires admin rights.
If you can run AutoIT tests you must have previously installed the AutoiT suite independently from the RF library. it also registers those dlls but it does it correctly.
If you can't, run the setup or just run the regsvr32.exe command in an elevated prompt.

Tom
Reply all
Reply to author
Forward
0 new messages