Error when running RF test in Azure DevOps pipeline

After importing the library with python package in my local vm the test works fine. once I upload the test into azure DevOps and run it in my pipeline it errors out (See error below)

Error in file ‘C:\agent2_work\3\s\BlanketPo-MySubmission.robot’ on line 3: Importing library ‘PyWindowsGuiLibrary’ failed: ModuleNotFoundError: No module named ‘PyWindowsGuiLibrary’

How would I upload the python packages to my azure devops pipeline?
I also added to the azure-pipelines.yml
-script
pip install robotframework-PyWindowsGuiLibrary

still doesnt work but would a solution like this work?

Hi @vdavis345,

You will need to install the module “PyWindowsGuiLibrary” on your azure machine

I’m not familiar with this module (PyWindowsGuiLibrary), is it a custom module or is it something you installed with pip?

If you can install it with pip, that would be your easiest option, just add it to the command you use to install robot framework which is also usually a pip install.

If it’s a custom module, you’ll need to transfer the files onto the azure machine (this will be similar to how you got your robot and yml files there) and then you might need to install the module or give the path to the module to your robot framework script.

I hope that helps,

Dave.

Thanks Dave!
Yea it’s one of the RF libraries that can automate desktop apps, but after talking to the author he brought my attention that it needs UI and won’t run headless.

I do have one last question… can you suggest me a library that can manipulate file explorer? by selecting a file and opening it or uploading ?

Hi @vdavis345 ,

Does it need to be done via file explorer (windows gui?) or can the files just be manipulated directly at the OS level (much easier)?

If the files just be manipulated directly at the OS level, OperatingSystem has keywords for manipulating local files and folders, create, edit, rename, delete etc

As for uploading, that will depend on what the upload process is, POST from RequestsLibrary will let you upload to a web server, likewise Send Cmd from FtpLibrary will let you upload via ftp, there are numerous other methods for “uploading” knowing which you need will determine which library to use.

Hope that helps,

Dave.