0
votes

RobotFramework - AutoItlibrary: Importation de la bibliothèque de test "AutoItlibrary" a échoué

Quelqu'un peut-il supporter-moi cette affaire?

J'installe les mêmes étapes dans 2 machines avec des configurations similaires. Mais une machine fonctionne. Une machine échoue lors de l'importation automatique d'autoitlibrary.

Afficher le journal de trajet - L'erreur indique: xxx


4 commentaires

Un cas de test simple avec AutoAtlibrary est-il OK dans la fenêtre de commande?


J'ai également confronté le même problème avec les mêmes versions de bibliothèques. Je suis donc rentré sur des versions plus anciennes pour continuer à fonctionner jusqu'à ce que cette erreur soit résolue de la communauté.


Non, ça ne marche pas, @Helio.


Je suis retourné à la vieille version, ça marche, @med.


3 Réponses :


0
votes

J'ai eu le même problème et j'ai été testé avec une bibliothèque 32 bits puis a fonctionné.


1 commentaires

J'ai essayé les deux 32, 64bits de Python27, Pwin32 ... éteindre l'UAC, le pare-feu. Ne fonctionne pas encore pour cette machine. Je pense qu'il y a quelque chose qui ne va pas sur cette machine.



0
votes
@echo off
setlocal

set "jsfile=%temp%\autoit3x_comtest.js"

(
    echo try {
    echo     oAutoIt = new ActiveXObject("AutoItX3.Control"^);
    echo }
    echo catch (e^) {
    echo     WScript.Echo("Catch: " + e^);
    echo     WScript.Quit (1^);
    echo }
) > "%jsfile%"

set "system=System32"

if /i not "%PROCESSOR_ARCHITECTURE%" == "x86" (
    set "system=SysWOW64"
)

echo Using: %system%

"%SYSTEMROOT%\%system%\cscript.exe" //nologo "%jsfile%"
if not errorlevel 1 (
    echo No error detected.
    goto :done
)

>nul 2>nul net session
if errorlevel 1 (
    if not exist "AutoItX3.dll" if not exist "AutoItX3_x64.dll" goto :done
    echo Require to run as admin to register any dlls.
    goto :done
)

if exist "AutoItX3.dll" (
    echo Register AutoItX3.dll
    for %%A in ("/u" "") do (
        "%SYSTEMROOT%\%system%\regsvr32.exe" /s %%~A "AutoItX3.dll"
    )
)

if exist "AutoItX3_x64.dll" if exist "%SYSTEMROOT%\SysWOW64" (
    echo Register AutoItX3_x64.dll
    for %%A in ("/u" "") do (
        "%SYSTEMROOT%\System32\regsvr32.exe" /s %%~A "AutoItX3_x64.dll"
    )
)

:done
del "%jsfile%"
I suspect the AutoItX3.dll is not registered, which outputs a COM error.The code above is batch-file, so you could save it as e.g. autoitx_comtest.cmd. It uses JScript to try to load the AutoItX3.Control object. If it fails and the script is running as admin, it will register the dlls if exist in the directory.AutoitLibrary usually only provides the 32 bit dll, which is AutoItX3.dll. If you want 64 bit as well, add AutoItX3_x64.dll to the directory to be registered. If you have AutoIt3 installed, then you may already have the dlls registered by the installer.If you have Python 64 bit installed, then AutoItX3_x64.dll may be required to use AutoItLibrary with it as 64 bit executables cannot use 32 bit dlls and vice versa.Note: If you know how to register dlls with regsvr32, then you could just use that instead of the batch-file.Compatibility with additional dllsFor compatibility with AutoItLibrary using an older version 3.3.6.0 of AutoItX3.dll.
I could recommend using dlls from the archived versions and downloading autoit-v3.3.6.0-sfx.exe
to get the dlls. In the latest AutoItX version, some methods were removed, such as RegRead.
Also, the AutoItLibrary author may not support any version other than 3.3.6.0.If you have the latest AutoIt Installer installed, then you may need to unregister those dlls and ensure the 3.3.6.0 dlls are registered to be compatible. I am unsure if you can have different versions of the dlls
registered at the same time, on the same system.The latest version of AutoItX dlls may work quite well, but AutoItLibrary keywords listed in the Documentation, such as Reg Read, Reg Write and some others may not be available as the methods were removed from the latest versions.Latest vs compatibility, your choice.

2 commentaires

Merci Michael. Aujourd'hui, je désinstalle tout ce qui est associé robotframework & python. Ensuite, je réinstalle: python2.7 32b -> robotframework v2.9 -> wxpython2.8 -> pywin32 32b -> autoitlibrary1.1 -> AutoIt-V3-Configuration. Ça marche, heureusement.


J'ai ajouté une section sur la compatibilité. Considéré qu'il est important de mentionner les effets de l'utilisation de toutes les DLL AutoItX autres que le 3.3.6.0 que AutoAtlibrary distribue.



0
votes

J'ai eu le même problème.

Installation d'AutoIt3 et redémarrage effacé l'erreur dans Ride.


0 commentaires