0

I am using a Python script with Selenium, to open a web page, but if I try to run the script from SSH, it does not open the browser on the other computer. I am trying to do it in a virtual machine.

I'm trying to run it both inside a .bat with the script:

@echo off python test2.py

You can also call it directly with py test2.py

This is what it shows me in SSH: https://imgur.com/WQ8To2O

But, on the Windows machine, nothing happens.

1 Answer 1

0
  1. You need to make sure you have the drivers and browser on the target machine, and setup correctly in the code (If it worked in Windows it won't necessarily be the same on Linux)
  2. If you don't have UI in the target machine, you should also enable headless mode in your browser options

Alternatively (my personal choice as well) you could just run Selenium Grid on the target machine, and let your script run from your computer, a much nicer way to debug it as well, and it can also automatically manage the drivers for the browser.

Not the answer you're looking for? Browse other questions tagged or ask your own question.