my problem is, that I wrote some python scripts, which are working fine. Now I have to get them to work on an ubuntu server. The problem is, that I need to use the chromedriver (selenium) and ofc there cant be an open browser at the server. So is there a way to use selenium with a server?
-
Any packages you've installed locally for your scripts to work, should be also installed on the server.0buz– 0buz2020-02-28 15:10:48 +00:00Commented Feb 28, 2020 at 15:10
-
But the script needs a file on the clients desktop. The chromedriver, the chromedriver cant work on a server?LittleDuck19– LittleDuck192020-02-28 15:11:03 +00:00Commented Feb 28, 2020 at 15:11
Add a comment
|
1 Answer
What you need is called 'Headless' editions of a browser.
These headless browsers don't open up as a browser but run in the background for you to perform scripts on.
Try searching for Headless + 'The browser driver you use'
Here is a quick tutorial to get you started: https://medium.com/@pyzzled/running-headless-chrome-with-selenium-in-python-3f42d1f5ff1d