Coder Social home page Coder Social logo

robotframework-autoitlibrary's Introduction

AutoItLibrary

Latest Version

Changelog: 2020/09/28 Return PID of the launched application using "Run" keyword 2018/06/29 Added Python 3 support

Introduction

AutoItLibrary is a Python keyword library that extends Robot Framework by providing keywords based on the COM interface to AutoIt. AutoIt is a freeware tool for automating the Windows GUI.

In order to do screenshots, the AutoItLibrary uses the PIL (Python Image Library).

Installation

Make sure you run the installation command with administrative privilages.

pip install

pip install robotframework-autoitlibrary

source install

AutoItLibrary installs its own file and, if not already present, the 3rd party AutoIt and PIL tools. To install, unzip the release file into a temporary directory on your PC, open a command window in that directory and type:

python setup.py install

This installation creates the folder:

C:\RobotFramework\Extensions\AutoItLibrary

on your PC and puts various files into this directory folder.

Documentation

AutoItLibrary documentation is installed by the installation process into:

C:\RobotFramework\Extensions\AutoItLibrary\AutoItLibrary.html

The AutoItX documentation is also installed into this folder as AutoItX.chm.

Tests

The AutoItLibrary installer puts a suite of self-tests here:

C:\RobotFramework\Extensions\AutoItLibrary\tests

To run these tests, which exercise the Windows Calculator GUI, run the RunTests.bat file in the above folder.

Note: Windows 10 Calculator is not supported.

robotframework-autoitlibrary's People

Contributors

lucyking avatar mihaiparvu avatar mpheath avatar qitaos avatar vinayvennela avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

robotframework-autoitlibrary's Issues

error while install robotframework-autoitlibrary

I face the below error while installing autoitlibrary using pip

Collecting robotframework-autoitlibrary
Using cached robotframework-autoitlibrary-1.2.7.tar.gz (696 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\program files\python38\python.exe' -c 'import sys, setuptools,
tokenize; sys.argv[0] = '"'"'C:\Users\J84500159SA\AppData\Local\Temp\pip-
install-t6qfhbnb\robotframework-autoitlibrary_2208d6c3255040a9b373c8a6a4a46df1
\setup.py'"'"'; file='"'"'C:\Users\J84500159SA\AppData\Local\Temp\pip-
install-t6qfhbnb\robotframework-autoitlibrary_2208d6c3255040a9b373c8a6a4a46df1
\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read()
.replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"
'"'exec'"'"'))' egg_info --egg-base 'C:\Users\J84500159SA\AppData\Local\Temp\pip
-pip-egg-info-lmzdro17'
cwd: C:\Users\J84500159SA\AppData\Local\Temp\pip-install-t6qfhbnb\robot
framework-autoitlibrary_2208d6c3255040a9b373c8a6a4a46df1
Complete output (7 lines):
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\J84500159SA\AppData\Local\Temp\pip-install-t6qfhbnb\robotfr
amework-autoitlibrary_2208d6c3255040a9b373c8a6a4a46df1\setup.py", line 93, in
destPath = os.path.normpath(os.path.join(os.getenv("HOMEDRIVE"), r"\Robo
tFramework\Extensions\AutoItLibrary"))
File "c:\program files\python38\lib\ntpath.py", line 78, in join
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/1f/e7/944c114dbb2db2
3d93e47c3449df92aaa823e57b94d861f963597ebea3b4/robotframework-autoitlibrary-1.2.
7.tar.gz#sha256=4b154340b95a5f848c00af3f079ae41587270741925f430d61ffc5c1db00ad40
(from https://pypi.org/simple/robotframework-autoitlibrary/). Command errored o
ut with exit status 1: python setup.py egg_info Check the logs for full command

i am using 64 bit windows 7 OS and python installed on C:\programfiles\python38 folder, there is no space. tried in administrator cmd mode

please advice

RobotFramework folder location not as documented & AutoItX3.dll not in documented location

Windows 10 Pro 10.0.18363 Build 18363 64 bit Virtual Machine
Python 3.9.6

I install robotframework-autoitlibrary from requirements file.

There are two issues:

  1. The RobotFramework folder is being created in the site-packages folder NOT in C:\
  2. The AutoItX3.dll folder is not being placed in the site-packages/AutoItLibrary/lib folder.. There is NOT a lib folder at all

This is causing the following error on import of the library:

C:\Users\SQAAdmin>robot -d *** -v CHROMEDRIVER:94 -v BRANCH:Main -v ***:*** -v ***:*** -t *** ***\RemoteMachineSuite.robot
[ ERROR ] Error in file '***\resources.robot' on line 2: Importing library 'AutoItLibrary' failed: com_error: (-2147312566, 'Error loading type library/DLL.', None, None)
Traceback (most recent call last):
  File "c:\python39\lib\site-packages\AutoItLibrary\__init__.py", line 46, in <module>
    win32com.client.gencache.EnsureModule("{F8937E53-D444-4E71-9275-35B64210CC3B}", 0, 1, 0)
  File "c:\python39\lib\site-packages\win32com\client\gencache.py", line 515, in EnsureModule
    module = MakeModuleForTypelib(typelibCLSID, lcid, major, minor, progressInstance, bForDemand = bForDemand, bBuildHidden = bBuildHidden)
  File "c:\python39\lib\site-packages\win32com\client\gencache.py", line 284, in MakeModuleForTypelib
    makepy.GenerateFromTypeLibSpec( (typelibCLSID, lcid, major, minor), progressInstance=progressInstance, bForDemand = bForDemand, bBuildHidden = bBuildHidden)
  File "c:\python39\lib\site-packages\win32com\client\makepy.py", line 223, in GenerateFromTypeLibSpec
    tlb = pythoncom.LoadRegTypeLib(typelibCLSID, major, minor, lcid)
PYTHONPATH:
  C:\Python39\Scripts\robot.exe
  C:\***\Framework
  C:\***\Framework\lib
  C:\***\AutomatedTests
  C:\Users\***
  c:\python39\python39.zip
  c:\python39\DLLs
  c:\python39\lib
  c:\python39
  c:\python39\lib\site-packages
  c:\python39\lib\site-packages\win32
  c:\python39\lib\site-packages\win32\lib
  c:\python39\lib\site-packages\Pythonwin

Attempts (all done by admin user in admin prompt):

  1. I have fully purged all packages and reinstalled from requirements.txt file - no help
  2. I have uninstalled robotframework-autoitlibrary and reinstalled manually on cli - no help
    a. Noted that the pip uninstall fails with this error
Uninstalling robotframework-autoitlibrary-1.2.7:
ERROR: Exception:
Traceback (most recent call last):
  File "c:\python39\lib\shutil.py", line 806, in move
    os.rename(src, real_dst)
PermissionError: [WinError 5] Access is denied: 'c:\\python39\\lib\\site-packages\\robotframework\\extensions\\autoitlibrary\\' -> 'C:\\Python39\\Lib\\site-packages\\RobotFramework\\Extensions\\~utoitlibrary'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python39\Lib\site-packages\pip\_internal\cli\base_command.py", line 164, in exc_logging_wrapper
    status = run_func(*args)
  File "C:\Python39\Lib\site-packages\pip\_internal\commands\uninstall.py", line 97, in run
    uninstall_pathset = req.uninstall(
  File "C:\Python39\Lib\site-packages\pip\_internal\req\req_install.py", line 696, in uninstall
    uninstalled_pathset.remove(auto_confirm, verbose)
  File "C:\Python39\Lib\site-packages\pip\_internal\req\req_uninstall.py", line 384, in remove
    moved.stash(path)
  File "C:\Python39\Lib\site-packages\pip\_internal\req\req_uninstall.py", line 282, in stash
    renames(path, new_path)
  File "C:\Python39\Lib\site-packages\pip\_internal\utils\misc.py", line 307, in renames
    shutil.move(old, new)
  File "c:\python39\lib\shutil.py", line 824, in move
    rmtree(src)
  File "c:\python39\lib\shutil.py", line 740, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "c:\python39\lib\shutil.py", line 622, in _rmtree_unsafe
    onerror(os.rmdir, path, sys.exc_info())
  File "c:\python39\lib\shutil.py", line 620, in _rmtree_unsafe
    os.rmdir(path)
OSError: [WinError 145] The directory is not empty: 'c:\\python39\\lib\\site-packages\\robotframework\\extensions\\autoitlibrary\\'
  1. After pip install, i have manually created the lib folder and copied the dll there and the ran the registration command and the win32 makepy command found in setup.py - no help
  2. After another uninstall, I have cloned the repo and installed using python setup.py install - This works as documented. The RobotFramework folder is created in the C:\ drive and the lib folder is created in the site-packages/AutoItLibrary folder and is populated with the AutoItX3.dll file. A subsequent execution of our test runs without error.

There is apparently a severe issue with the pip install process.

Import AutoITLibrary error

Hi All, I have installed AutoIT Library through EXE file. also installed through pip command after opening commandprompt as administrator. however when I keep the library in my resource file in robot framework and run, getting the below error.

resources.robot' on line 16: Importing library 'AutoITLibrary' failed: ModuleNotFoundError: No module named 'AutoITLibrary'
Traceback (most recent call last):
None please help

documentation not aligned with implementation

The documentation in AutoItLibrary.html indicates a large coverage of AutoItv3 command set, however only a few commands seem to be actually covered. All others (e.g. "Process Wait") give and error when called in a robot file.
Either the commands should be implemented or the documentation modified to reflect actual coverage of AutoItv3.

The included test batch uses pybot which is deprecated since Robot Framework 3.0

The RunTests.bat included in robotframework-autoitlibrary/tests/ uses pybot for running the test. Using pybot is deprecated with Robot Framework since the version 3.0, and tests should be run instead using robot. robot is backwards compatible, so the change can done without further compatibility considerations.

More about running RF and about robot/pybot/etc. usage at http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#executing-robot-framework.

Validation problem in "Get Screen Image" and "Get Active Window Image"

Hi!

I needed to comment on this validation to be able to take screenshots:

# if FilePath and os.path.isabs(FilePath):
#     raise RuntimeError("Given FilePath='%s' must be relative to Robot outpudir" % FilePath)

I work with Windows 10 and Python 3.7. Could you analyze the need for this validation?

My robot code (that works without the validation!):

My TestTeardown
      Get Screen Image        ${OUTPUTDIR}\\${TESTTAGS[0]}_${TESTSTATUS}.png

Error while installing AutoITLibrary 1.2.4 version.

Error while trying to install AutoITLibrary version 1.2.4. Below is the error in cmd. Could you please help me here?

C:\Temp\robotframework-autoitlibrary-1.2.4>python setup.py install
Don't think we need to unregister the old one...
%SYSTEMROOT%\system32\regsvr32.exe /S C:\Program Files\Python35\Lib\site-package
s\AutoItLibrary\lib\AutoItX3.dll
Traceback (most recent call last):
File "setup.py", line 75, in
subprocess.check_call(cmd, shell=True)
File "C:\Program Files\Python35\lib\subprocess.py", line 271, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '%SYSTEMROOT%\system32\regsvr32.exe /S C:
\Program Files\Python35\Lib\site-packages\AutoItLibrary\lib\AutoItX3.dll' return
ed non-zero exit status 3

C:\Temp\robotframework-autoitlibrary-1.2.4>

I also tried installing using PIP command but again the below error shows up.

C:\Temp\robotframework-autoitlibrary-1.2.4>pip install robotframework-autoitlibr
ary
Collecting robotframework-autoitlibrary
Downloading .../robotframework-autoitlibrary-1.2.4.zip (701kB)
100% |################################| 706kB 17.6MB/s
Requirement already satisfied: pywin32 in c:\program files\python35\lib\site-pac
kages (from robotframework-autoitlibrary)
Requirement already satisfied: pillow in c:\program files\python35\lib\site-pack
ages (from robotframework-autoitlibrary)
Installing collected packages: robotframework-autoitlibrary
Running setup.py install for robotframework-autoitlibrary ... error
Complete output from command "c:\program files\python35\python.exe" -u -c "i
mport setuptools, tokenize;file='C:\Users\BA05476\AppData\Local\Temp\p
ip-build-t8iw_px1\robotframework-autoitlibrary\setup.py';f=getattr(tokenize, '
open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compil
e(code, file, 'exec'))" install --record C:\Users\BA05476\AppData\Local\Temp
\pip-mb2nou3f-record\install-record.txt --single-version-externally-managed --co
mpile:
Don't think we need to unregister the old one...
%SYSTEMROOT%\system32\regsvr32.exe /S c:\program files\python35\Lib\site-pac
kages\AutoItLibrary\lib\AutoItX3.dll
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\BA05476\AppData\Local\Temp\pip-build-t8iw_px1\robotframewor
k-autoitlibrary\setup.py", line 75, in
subprocess.check_call(cmd, shell=True)
File "c:\program files\python35\lib\subprocess.py", line 271, in check_cal
l
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '%SYSTEMROOT%\system32\regsvr32.exe /
S c:\program files\python35\Lib\site-packages\AutoItLibrary\lib\AutoItX3.dll' re
turned non-zero exit status 3

----------------------------------------

Command ""c:\program files\python35\python.exe" -u -c "import setuptools, tokeni
ze;file='C:\Users\BA05476\AppData\Local\Temp\pip-build-t8iw_px1\robot
framework-autoitlibrary\setup.py';f=getattr(tokenize, 'open', open)(file);c
ode=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'
))" install --record C:\Users\BA05476\AppData\Local\Temp\pip-mb2nou3f-record\ins
tall-record.txt --single-version-externally-managed --compile" failed with error
code 1 in C:\Users\BA05476\AppData\Local\Temp\pip-build-t8iw_px1\robotframework
-autoitlibrary
You are using pip version 9.0.1, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm
and.

C:\Temp\robotframework-autoitlibrary-1.2.4>

Auto It Library Send keywords are not working on Latest chrome version 68.0

Hi,

The send keywords(Send,ControlSend) are not working to handle window authentication pop up in the latest chrome version 68.0 even though I have tried with the latest chrome driver version 41. Kindly advise.
Note: I have used these keywords and it was working fine in Chrome version 64.0 & Driver version 32

Please update documentation

The documentation doesn't have any information about what would be the return value of the keywords. The documentation regarding setting up library itself is wrong.

This works :
Library AutoItLibrary 30 ${OUTPUTDIR}

This fails:
Library AutoItLibrary 30 ${OUTPUTDIR} ${True}

I went through the source code and it was observed that there is no parameter for output Dir in init.py

def __init__(self, TimeOut=60, CaptureScreenOnError=False) :

so the actual configuration for importing library is:

Library AutoItLibrary 30 ${True}

Also:
The documentation says the keyword works exactly as per autoIT documentations. But for autoIT each keyword gives a status code (0 if fails else the handler)

Does this library uses these outputs or we have to use the wrapper keywords like win wait active and all .

Thanks again for your time and efforts in looking into this.

Autoit >>Mouseclick ,controlclick not working in robot framework ,not able to click any part of screen

Hi

I just installed auto it library in robot framework and its installed properly and i am able to access all the keywords in framework. The problem what i faced is whenever i am trying to use any click option is not clicking or failing. Somehow i got lucky with mouseclick and its working but problem with this method is its able to point in that particular tab but not clicking.

So after several tries I downloaded official auto it package and i had written the script in scite in .au3 extension. The script worked absolutely fine .Mouseclick is able to point as well as click.

Below are the questions:

Q-I want to know why in robot framework we are not able to get the full functionality of keywords that is there already in auto it if we are able to access auto it keywords in robot framework ?
Q- What 's the workaround for this issue ?

Unable to install - win32com issue?

Getting the following error after running the install command on an admin prompt


C:\Windows\system32>pip install robotframework-autoitlibrary --no-cache-dir
Collecting robotframework-autoitlibrary
  Downloading robotframework-autoitlibrary-1.2.7.tar.gz (696 kB)
     |████████████████████████████████| 696 kB 1.3 MB/s
  Preparing metadata (setup.py) ... done
Requirement already satisfied: pywin32 in c:\users\username\appdata\roaming\python\python37\site-packages (from robotframework-autoitlibrary) (301)
Requirement already satisfied: pillow in c:\program files\python37\lib\site-packages (from robotframework-autoitlibrary) (8.3.2)
Using legacy 'setup.py install' for robotframework-autoitlibrary, since package 'wheel' is not installed.
Installing collected packages: robotframework-autoitlibrary
    Running setup.py install for robotframework-autoitlibrary ... error
    ERROR: Command errored out with exit status 2:
     command: 'C:\Program Files\Python37\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\USE~1.AME\\AppData\\Local\\Temp\\pip-install-0w7o5y10\\robotframework-autoitlibrary_fa8e6ee5cad94f138d73f7813ef4bfdd\\setup.py'"'"'; __file__='"'"'C:\\Users\\USE~1.AME\\AppData\\Local\\Temp\\pip-install-0w7o5y10\\robotframework-autoitlibrary_fa8e6ee5cad94f138d73f7813ef4bfdd\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\USE~1.AME\AppData\Local\Temp\pip-record-0kc7z3h1\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Program Files\Python37\Include\robotframework-autoitlibrary'
         cwd: C:\Users\USE~1.AME\AppData\Local\Temp\pip-install-0w7o5y10\robotframework-autoitlibrary_fa8e6ee5cad94f138d73f7813ef4bfdd\
    Complete output (3 lines):
    Don't think we need to unregister the old one...
    %SYSTEMROOT%\system32\regsvr32.exe /S "C:\Program Files\Python37\Lib\site-packages\AutoItLibrary\lib\AutoItX3.dll"
    AutoItLibrary requires win32com. See http://starship.python.net/crew/mhammond/win32/.
    ----------------------------------------
ERROR: Command errored out with exit status 2: 'C:\Program Files\Python37\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\USE~1.AME\\AppData\\Local\\Temp\\pip-install-0w7o5y10\\robotframework-autoitlibrary_fa8e6ee5cad94f138d73f7813ef4bfdd\\setup.py'"'"'; __file__='"'"'C:\\Users\\USE~1.AME\\AppData\\Local\\Temp\\pip-install-0w7o5y10\\robotframework-autoitlibrary_fa8e6ee5cad94f138d73f7813ef4bfdd\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\USE~1.AME\AppData\Local\Temp\pip-record-0kc7z3h1\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Program Files\Python37\Include\robotframework-autoitlibrary' Check the logs for full command output.

My environment:
Windows 10 Enterprise
Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] on win32

Looks like win32com might be related to the issue? But I have pywin32 installed.

Getting issue while downloading autoitlibrary

C:\Python27\Scripts>pip install robotframework-autoitlibrary
Collecting robotframework-autoitlibrary
  Using cached robotframework-autoitlibrary-1.1.zip
Installing collected packages: robotframework-autoitlibrary
  Running setup.py install for robotframework-autoitlibrary ... error
    Complete output from command c:\python27\python.exe -u -c "import setuptools
, tokenize;__file__='c:\\users\\duser\\appdata\\local\\temp\\pip-build-byc
f1b\\robotframework-autoitlibrary\\setup.py';f=getattr(tokenize, 'open', open)(_
_file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file
__, 'exec'))" install --record c:\users\duser\appdata\local\temp\pip-bzuai
8-record\install-record.txt --single-version-externally-managed --compile:
    %SYSTEMROOT%\system32\regsvr32.exe /S c:\python27\Lib\site-packages\AutoItLi
brary\lib\AutoItX3.dll
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\duser\appdata\local\temp\pip-build-bycf1b\robotframew
ork-autoitlibrary\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\AutoItX3.dll' returned non-zer
o exit status 5

    ----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\
\users\\duser\\appdata\\local\\temp\\pip-build-bycf1b\\robotframework-auto
itlibrary\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().r
eplace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --
record c:\users\duser\appdata\local\temp\pip-bzuai8-record\install-record.
txt --single-version-externally-managed --compile" failed with error code 1 in c
:\users\duser\appdata\local\temp\pip-build-bycf1b\robotframework-autoitlib
rary\

C:\Python27\Scripts>

Send & Control Send is not working with new Chrome version(v.70) and driver(v43) for windows authentication

Hi @lucyking @mihaiparvu @qitaos ,

Send & Control Send methods are working fine till chrome version 66 and its respective driver version 28 to 32. But when the chrome got updated to version 70, the send and Control Send methods are not working as expected with driver version 42&43. I've triggered chrome driver(42/43) using python library robot framework, keyword-Open Browser. Kindly advise.
autoit issue

facing this issue while installing autoit...can anyone help pls?

pip install robotframework-autoitlibrary
Collecting robotframework-autoitlibrary
Using cached robotframework-autoitlibrary-1.2.5.tar.gz (696 kB)
Requirement already satisfied: pywin32 in c:\python\python 3.8\lib\site-packages (from robotframework-autoitlibrary) (228)
Requirement already satisfied: pillow in c:\python\python 3.8\lib\site-packages (from robotframework-autoitlibrary) (7.2.0)
Using legacy 'setup.py install' for robotframework-autoitlibrary, since package 'wheel' is not installed.
Installing collected packages: robotframework-autoitlibrary
Running setup.py install for robotframework-autoitlibrary ... error
ERROR: Command errored out with exit status 1:
command: 'c:\python\python 3.8\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\niktr\AppData\Local\Temp\pip-install-o_n58w0p\robotframework-autoitlibrary\setup.py'"'"'; file='"'"'C:\Users\niktr\AppData\Local\Temp\pip-install-o_n58w0p\robotframework-autoitlibrary\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\niktr\AppData\Local\Temp\pip-record-i6ef1_0f\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python\python 3.8\Include\robotframework-autoitlibrary'
cwd: C:\Users\niktr\AppData\Local\Temp\pip-install-o_n58w0p\robotframework-autoitlibrary
Complete output (10 lines):
Don't think we need to unregister the old one...
Here is from 32bit OS
%SYSTEMROOT%\system32\regsvr32.exe /S c:\python\python 3.8\Lib\site-packages\AutoItLibrary\lib\AutoItX3.dll
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\niktr\AppData\Local\Temp\pip-install-o_n58w0p\robotframework-autoitlibrary\setup.py", line 75, in
subprocess.check_call(cmd, shell=True)
File "c:\python\python 3.8\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '%SYSTEMROOT%\system32\regsvr32.exe /S c:\python\python 3.8\Lib\site-packages\AutoItLibrary\lib\AutoItX3.dll' returned non-zero exit status 3.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python\python 3.8\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\niktr\AppData\Local\Temp\pip-install-o_n58w0p\robotframework-autoitlibrary\setup.py'"'"'; file='"'"'C:\Users\niktr\AppData\Local\Temp\pip-install-o_n58w0p\robotframework-autoitlibrary\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\niktr\AppData\Local\Temp\pip-record-i6ef1_0f\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python\python 3.8\Include\robotframework-autoitlibrary' Check the logs for full command output.

Initializing library 'AutoItLibrary' with no arguments failed: com_error: (-2147221164, 'Class not registered', None, None)

Hi,

here is how I use it:

robot --version 
Robot Framework 6.1.1 (Python 3.9.2 on win32)

install:

py -m pip install robotframework
py -m pip install robotframework-autoitlibrary

in a cmd promt as admin:
regsvr32.exe *:\UserData\*******\AppData\Roaming\Python\Python39\site-packages\RobotFramework\Extensions\AutoItLibrary\AutoItX3.dll

the robot file I use:

*** Settings ***
Library    AutoItLibrary

*** Test Cases ***
Open Notepad And Write Text
    Run    some/executable/path.exe
    Win Wait Active    Untitled - VisualStudio2019
    Send    Hello, Robot Framework!

here is what I get:

Error in file '*:\*********\ui_robot_testing\test.robot' on line 2: Initializing library 'AutoItLibrary' with no arguments failed: com_error: (-2147221164, 'Class not registered', None, None)

let me know if you need more informations

Handling File Upload using AutoIT Library not working as expected

I am trying to Automate the File upload using AUTOIT, but when handled the File upload popup is coming up twice.

Below are the steps followed after browser launch

Step-1: Click on Choose File button
Step-2: Waited for Active Window
Step-3: Control send path of file
Step-4: control click on open button and popup closed , but again its opening (Attached the code and gif of recording)

Code

`
*** Settings ***
Documentation We are testing 'File upload usinf AutoIT' for the website 'https://cgi-lib.berkeley.edu/ex/fup.html'
Library SeleniumLibrary
Library AutoItLibrary
*** Variables ***
${inputElement} css:input[name='upfile']

*** Test Cases ***
My Fileupload2
open browser https://cgi-lib.berkeley.edu/ex/fup.html chrome
Maximize Browser Window
Double Click Element ${inputElement}
Wait For Active Window Open ${SPACE}
sleep 1s
control send [CLASS:#32770; TITLE:Open] ${EMPTY} [CLASSNN:Edit1] C:\Auto\index.html
sleep 3s
control click [CLASS:#32770; TITLE:Open] ${EMPTY} [CLASSNN:Button1]
sleep 1s
#Click Element xpath://input[@type='submit']
sleep 1s
Close Browser
`

Recording

AutoITPopup

Below are the Technical details of the versions used

Windows 10 Enterprise OS
Python 3.11.1

I installed all the dependencies from the requirements file.

image

I request anyone has expertise or insights to share, I would greatly appreciate your support and contributions in addressing this issue.

@lucyking @qitaos @mihaiparvu @mihaiparvu @josoinin

Thank you all in advance for being a part of our supportive community!

Importing test library "AutoItLibrary" failed"

updating:

I resolve my probleme.

becareful : open 'cmd' with administrator rights is not the same to open a session with administrator account on windows 10.
I connected with admnistrator account and I re-installed the library ...."pip install robotframework-autoitlibrary==1.2.5"
I resolve my probleme.

becareful : open 'cmd' with administrator rights is not the same to open a session with administrator account on windows 10.
I connected with admnistrator account and I re-installed the library ...."pip install robotframework-autoitlibrary==1.2.5"
and now it works fine.


Hi everybody,

I have the same issue.
In robotframework , the AutoitLibrary (is Highlighted in red)

I use python 3.7 on windows10.
The installation of library AutoItLibrary with pip command was succesfully without any error.
(robotframework-autoitlibrary 1.2.7)
But robotframework can not see it.

in tools->ride.log
"20201117 13:25:52.641 [INFO]: Found Robot Framework version 3.2.1 from C:\Python37\lib\site-packages\robot.
20201117 13:25:52.641 [INFO]: Started RIDE 1.7.4.2 using python version 3.7.7 with wx version 4.0.7.post2 in win32.
20201117 13:26:06.969 [WARN]: Importing test library "AutoItLibrary" failed"

Can you help me?
Thanks in advance

strange H: disk required

Both directly install or download the gz package to local disk complain same error: creating H:\ disk
And both Python 2.7, python 3.9 tried.

c:\>pip install robotframework-autoitlibrary --proxy http://10.144.1.10:8080
Collecting robotframework-autoitlibrary
  Using cached robotframework-autoitlibrary-1.2.7.tar.gz (696 kB)
Collecting pywin32
  Downloading pywin32-301-cp39-cp39-win_amd64.whl (9.3 MB)
     |████████████████████████████████| 9.3 MB 726 kB/s
Collecting pillow
  Downloading Pillow-8.3.1-1-cp39-cp39-win_amd64.whl (3.2 MB)
     |████████████████████████████████| 3.2 MB 726 kB/s
Using legacy 'setup.py install' for robotframework-autoitlibrary, since package 'wheel' is not installed.
Installing collected packages: pywin32, pillow, robotframework-autoitlibrary
    Running setup.py install for robotframework-autoitlibrary ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\xxx\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\xxx\\AppData\\Local\\Temp\\pip-install-s1_eqmbv\\robotframework-autoitlibrary_f394e44522e847bb9826b988ff16e5ab\\setup.py'"'"'; __file__='"'"'C:\\Users\\xxx\\AppData\\Local\\Temp\\pip-install-s1_eqmbv\\robotframework-autoitlibrary_f394e44522e847bb9826b988ff16e5ab\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\xxx\AppData\Local\Temp\pip-record-f1jdshr9\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\xxx\appdata\local\programs\python\python39\Include\robotframework-autoitlibrary'
         cwd: C:\Users\xxx\AppData\Local\Temp\pip-install-s1_eqmbv\robotframework-autoitlibrary_f394e44522e847bb9826b988ff16e5ab\
    Complete output (25 lines):
    %SYSTEMROOT%\system32\regsvr32.exe /S "c:\users\xxx\appdata\local\programs\python\python39\Lib\site-packages\AutoItLibrary\lib\AutoItX3.dll"
    python "c:\users\xxx\appdata\local\programs\python\python39\Lib\site-packages\win32com\client\makepy.py" "c:\users\xxx\appdata\local\programs\python\python39\Lib\site-packages\AutoItLibrary\lib\AutoItX3.dll"
    Generating to C:\Users\xxx\AppData\Local\Temp\gen_py\3.9\F8937E53-D444-4E71-9275-35B64210CC3Bx0x1x0.py
    Building definitions from type library...
    Generating...
    Importing module
    running install
    running build
    running build_py
    creating build
    creating build\lib
    creating build\lib\AutoItLibrary
    copying src\AutoItLibrary\Counter.py -> build\lib\AutoItLibrary
    copying src\AutoItLibrary\Logger.py -> build\lib\AutoItLibrary
    copying src\AutoItLibrary\__init__.py -> build\lib\AutoItLibrary
    running install_lib
    copying build\lib\AutoItLibrary\Counter.py -> c:\users\xxx\appdata\local\programs\python\python39\Lib\site-packages\AutoItLibrary
    copying build\lib\AutoItLibrary\Logger.py -> c:\users\xxx\appdata\local\programs\python\python39\Lib\site-packages\AutoItLibrary
    copying build\lib\AutoItLibrary\__init__.py -> c:\users\xxx\appdata\local\programs\python\python39\Lib\site-packages\AutoItLibrary
    byte-compiling c:\users\xxx\appdata\local\programs\python\python39\Lib\site-packages\AutoItLibrary\Counter.py to Counter.cpython-39.pyc
    byte-compiling c:\users\xxx\appdata\local\programs\python\python39\Lib\site-packages\AutoItLibrary\Logger.py to Logger.cpython-39.pyc
    byte-compiling c:\users\xxx\appdata\local\programs\python\python39\Lib\site-packages\AutoItLibrary\__init__.py to __init__.cpython-39.pyc
    running install_data
    creating H:\
    error: could not create 'H:\': The system cannot find the path specified
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\xxx\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\xxx\\AppData\\Local\\Temp\\pip-install-s1_eqmbv\\robotframework-autoitlibrary_f394e44522e847bb9826b988ff16e5ab\\setup.py'"'"'; __file__='"'"'C:\\Users\\xxx\\AppData\\Local\\Temp\\pip-install-s1_eqmbv\\robotframework-autoitlibrary_f394e44522e847bb9826b988ff16e5ab\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\xxx\AppData\Local\Temp\pip-record-f1jdshr9\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\xxx\appdata\local\programs\python\python39\Include\robotframework-autoitlibrary' Check the logs for full command output.

AutoItLibrary Install Fails when Python path contains spaces (fix included)

tried to install latest 1.2.4 on windows64/python 3.7(32bit). it gave error:
C:\sw\robotframework-autoitlibrary-master>python setup.py install
Here is from 32bit OS
%SYSTEMROOT%\system32\regsvr32.exe /S C:\Program Files (x86)\Python37-32\Lib\site-packages\AutoItLibrary\lib\AutoItX3.dll
Traceback (most recent call last):
File "setup.py", line 75, in
subprocess.check_call(cmd, shell=True)
File "C:\Program Files (x86)\Python37-32\Lib\subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '%SYSTEMROOT%\system32\regsvr32.exe /S C:\Program Files (x86)\Python37-32\Lib\site-packages\AutoItLibrary\lib\AutoItX3.dll' returned non-zero exit status 3.

then HW71 commented due to the python path contains spaces:
HW71/AutoItLibrary#1

followed HW71's suggestion and setup is ok.
here is attached setup fix based on 1.2.4's setup.py.

setup-fixed_v2.zip

Update README to reflect difference in pip install.

README documentation states two methods of installation:

  1. pip install
  2. source install

The way I interpret the README is that either installation method should end in the same result.

Expected Result:

  1. C:\RobotFramework is created
  2. AutoIt is installed
  3. robotframework-autoitlibrary is installed

Actual Result:

  1. AutoItLibrary package is installed but some keywords are not present (ex.- Win Active & Control Click) in init.py file.
  2. C:\RobotFramework is not created
  3. Keyword documentation html file is not installed

Not sure if the README is incomplete or if this is truly an issue in the install process.

Env Details:
Win 10 VM using VMWare Fusion on Mac
Python 3.9.1 Venv

Send keyword is not working on IE 11

FYI

  • Python 3.7
  • robotframework 3.0.4
  • selenium 3.14.0
  • robotframework-seleniumlibrary 3.1.1
  • IEDriverServer 3.14.0.0 (32 bit)
  • robotframework-autoitlibrary 1.2.2 then after install with pip install robotframework-autoitlibrary I got all dependencies
  • Pillow 5.3.0
  • pywin32 244 (64bit)

OS: Windows 10 (v 1809)

What I've tried is call Send keyword to {ENTER} for the Windows Security window, but there's nothing happen to the Windows Security dialog as I expected.

What's the things I missed?

Some keyword are missing

Some keyword are missing
image

I've tried to "pip install -U robotframework-autoitlibrary" and reinstall python 3.7 still missing keyword

Below is my environment.
image

Cannot import AutoIt Library into Ride

I'm using Windows 10, Python 2.7.
When I try to deploy Ride to run robot tests on Windows 10, I found Ride cannot import keywords from AutoItLibrary, but Ride is able to run test with AutoItLibrary Keywords.
I used pip in Python 2.7 to install everything.

Return ProcessID when application is launched with the keyword Run

As per standard AutoIt implementation, run() returns the PID of the application that was launched which can be used further.

However the keyword "Run" doesn't return anything, we should add this implementation so that the output PID can be used later in keywords like "Process Close" etc.

This is a feature request, and I'm happy to create a PR for the same

URGENT: COM interface methods/keywords not available post the successful installation of the library.

Hi Lucyking,

Bogged down in reading through many sites to find a solution for this but ended up in vain!

So, I installed this library using the setup.py. and it went through successfully on a Win 10 VM. Using RIDE, tried to write a test case to automate 'Save As' dialog box, but unable to proceed any further due to the non-availability of COM interface keywords.

I can only see and use the direct wrapper keywords Get Active Window Image, Get Auto It Version, Get Screen Image, Get Version, Run, Wait For Active Window, Win Wait, Win Wait Active, Win Wait Close but NOT the method keywords like Send, Win Close, Mouse Click etc.,

Below are the version details if you require any:

robotframework-autoitlibrary 1.2.4
Python 3.7.0
RIDE 1.7.4 running on Python 3.7.0

P.S: The Calculator_Test_Cases failed with several failures but predominantly with No keyword with name 'Send' and 'Win Activate' found.

Would you be kind enough to let me know whats missing or would it be possible to give an example of how these method keywords should be used via RIDE tool?

Any help would be much appreciated.

Thanks

Initializing test library failed - Class not registered

I have Autoit3 installed (Hello world is working) and want to use this package in RIDE (2.0b1) on Python 3.7.9 and RF 3.2.2
The log shows this error when I activate AutoItLibrary:
Initializing test library 'AutoItLibrary' with no arguments failed: com_error: (-2147221164, 'Klasse is niet geregistreerd', None, None)

Klasse is niet geregistreerd = Class not registered.

What is wrong?

Can't find some key words

OS: Windows 10
Python: 3.6.5
Robotframework: 3.0.4
Robotframework-autoitlibrary: 1.2.2

I executed default tests located at folder RobotFramework\Extensions\AutoItLibrary\tests, it do not find key word "Send". Any solutions?
image

AutoIT Notepad simple test passes but doesnt launch Notepad

I have this very simple robot script to launch notepad.exe and type some text. The Test passes, but it doesnt launch notepad. I am using Windows 10, python 3.7.1 and here are my versions of python packages:

Appium-Python-Client==0.31
decorator==4.3.0
docutils==0.14
kitchen==1.2.5
Pillow==5.4.1
pywin32==224
robotframework==3.0.4
robotframework-appiumlibrary==1.5.0.1
robotframework-autoitlibrary==1.2.2
robotframework-seleniumlibrary==3.2.0
selenium==3.141.0
six==1.11.0
urllib3==1.24.1

My robot scripts reads like this:

*** Settings ***
Library           AutoItLibrary


*** Test Cases ***
AutoIT Notepad Test
    Run    notepad.exe
    Wait For Active Window    Untitled - Notepad
    Send    This is some text

What am I doing wrong?

Issue downloading library (Windows paths)

There was an issue addressed in #1, but there is more to this issue. To wit

 Running setup.py install for robotframework-autoitlibrary ... error
    ERROR: Complete output from command 'c:\program files (x86)\microsoft visual studio\shared\python37_64\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\mail\\AppData\\Local\\Temp\\pip-install-6x6avtkn\\robotframework-autoitlibrary\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\mail\AppData\Local\Temp\pip-record-pq_k2_99\install-record.txt' --single-version-externally-managed --compile:
    ERROR: Don't think we need to unregister the old one...
    %SYSTEMROOT%\system32\regsvr32.exe /S c:\program files (x86)\microsoft visual studio\shared\python37_64\Lib\site-packages\AutoItLibrary\lib\AutoItX3.dll
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\mail\AppData\Local\Temp\pip-install-6x6avtkn\robotframework-autoitlibrary\setup.py", line 75, in <module>
        subprocess.check_call(cmd, shell=True)
      File "c:\program files (x86)\microsoft visual studio\shared\python37_64\lib\subprocess.py", line 347, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '%SYSTEMROOT%\system32\regsvr32.exe /S c:\program files (x86)\microsoft visual studio\shared\python37_64\Lib\site-packages\AutoItLibrary\lib\AutoItX3.dll' returned non-zero exit status 3.
    ----------------------------------------
ERROR: Command "'c:\program files (x86)\microsoft visual studio\shared\python37_64\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\mail\\AppData\\Local\\Temp\\pip-install-6x6avtkn\\robotframework-autoitlibrary\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\mail\AppData\Local\Temp\pip-record-pq_k2_99\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\mail\AppData\Local\Temp\pip-install-6x6avtkn\robotframework-autoitlibrary\

PS > C:\Windows\system32\regsvr32.exe /S c:\program files (x86)\microsoft visual studio\shared\python37_64\Lib\site-packages\AutoItLibrary\lib\AutoItX3.dll
x86 : The term 'x86' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:55
+ C:\Windows\system32\regsvr32.exe /S c:\program files (x86)\microsoft  ...
+                                                       ~~~
+ CategoryInfo          : ObjectNotFound: (x86:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

PS > C:\Windows\system32\regsvr32.exe /S "c:\program files (x86)\microsoft visual studio\shared\python37_64\Lib\site-packages\AutoItLibrary\lib\AutoItX3.dll"
<-------- NO ERROR
PS >

On Windows, paths with spaces seem to be surrounded by double quotes in the shell (I'm mostly a *nix user, so this seems to be the issue). Updating the script to put double quotes around that command's path works, but it fails (even with Admin privileges) without that. I've run into this on two separate Windows 10 systems (Python 3.7), pyWin32 installed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.