Incorporate Macro into Python script on mac


I am new to UI.Vision and I am seeking to implement the following process:

I have a working web scraper written in Python Jupyter notebook. The scraper uses selenium and chromedriver to scrape from a website, but sometimes the website will show an error that interrupts the process and requires the user to click and enter certain stuff.

I’ve developed a macro in UI.Vision that can handle the error, so currently whenever my notebook is interrupted, I will run the macro manually for it to solve the process, and then manually resume my notebook. I am thinking of incorporating the macro into my notebook - is there a way for me to trigger the macro and run the macro on my currently open chromedriver webpage whenever the error is detected, and then resume the running of script after the macro finishes running?


You can start the RPA software directly from Python via the command line.

Thanks for your response! I’ve checked out the Python command line code on Github, but I am not sure how to make the macro run in my existing window, as the example seems to be opening up a new browser. I tried to change the browser path to where my chromedriver is located but it didn’t work. Do you have some sample codes that I could refer to?