There are several options:
-
All browsers: Add BringIDEandBrowserToBackground to your macro.
-
Use Firefox: In Firefox, you can set the sidebar to open by default. To enable this, open the sidebar manually once. After that, Firefox will automatically open/use the side bar by default - even when starting the browser from the Ui.Vision command line. This is a handy feature of Firefox . See it in action here. The GIF uses a Powershell script, but of course it works the same with Python.
Running the macro in the sidebar from the command line works only in Firefox. The reason is because the Chrome/Edge browsers allow only “real users” to open the side bar. A real user must click an icon for the sidebar to open. This is why in Chrome/Edge we must use the Ui.Vision IDE to run the macros from the command line.