0

I have a Python script that uses Selenium Webdriver. I want to run this on a server remotely. When running my script directly on the server through command window, everything works fine. But when I'm trying to trigger this remotely through a program on my local PC to the server, it doesn't work. It seems to stop at driver = webdriver.Chrome(webdriverlink). It doesn't fail, it just won't continue. So it seems like it doesn't actually opens a browser.

Isn't this possible when you're not logged in on the server and not running it directly from there?

I've saved my script in a py-file, and is triggering it in both ways throuh the command line python <myFileName>.py

2
  • Have you installed the relevant driver on the remote machine? Commented Nov 12, 2020 at 13:24
  • Yes, I have. Or else I wouldn't have managed to run it directly on the server.. Commented Nov 13, 2020 at 14:06

1 Answer 1

1

I found a solution from another forum after a lot of searching. So for all of you struggling with the same problem, this worked for me:

I've added the following code:
options = webdriver.ChromeOptions()
options.add_experimental_option('excludeSwitches', ['enable-logging'])

and changed from: driver = webdriver.Chrome(webdriverlink)
to driver = webdriver.Chrome(executable_path=webdriverlink,options=options)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.