Run Selenium Python Script on a remote server

I created a web scraper using Selenium, which I need to run when my local machine was asleep and not connected to the network. I have a remote server that I can use to run this script, but it's hard for me to understand how this will work. Can I use Selenium remote driver for this? I installed it on my local computer, do I need to install something on my server?

Here is an example of the start of my script, which works fine on my local:

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from twilio.rest import TwilioRestClient
import sys
# driver = webdriver.Chrome()
driver = webdriver.Remote(
command_executor='http://127.0.0.1:4444/wd/hub',
desired_capabilities=DesiredCapabilities.CHROME)

driver.get("http://www.southwest.com")
+4
source share
1 answer

? ? node?

→ () hub → register node choce, → jenkins , .

-1

Source: https://habr.com/ru/post/1598325/


All Articles