Запуск селена в Linux ⇐ Linux
-
Anonymous
Запуск селена в Linux
Im trying to run selenium off a linux server. It works fine on my windows 10 machine, but not on the server. Heres how I set up the driver:
options = webdriver.ChromeOptions() #Some options adjusted a bit for linux options.add_argument('--headless=new') options.add_argument('--headless') options.add_argument('--no-sandbox') options.add_argument('--disable-dev-shm-usage') driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options) driver.get(https://google.com) return driver I used these threads to help me run the script, and get selenium working: How to run a script in the background even after I logout SSH? How can I run selenium on Linux? As long as I am in my SSH session, everything works as normal. Though, when I exit my SSH, Im getting
no such window: target window already closed from unknown error: web view not found (Session info: chrome-headless-shell=122.0.6261.94) Stacktrace:
Источник: https://stackoverflow.com/questions/780 ... m-on-linux
Im trying to run selenium off a linux server. It works fine on my windows 10 machine, but not on the server. Heres how I set up the driver:
options = webdriver.ChromeOptions() #Some options adjusted a bit for linux options.add_argument('--headless=new') options.add_argument('--headless') options.add_argument('--no-sandbox') options.add_argument('--disable-dev-shm-usage') driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options) driver.get(https://google.com) return driver I used these threads to help me run the script, and get selenium working: How to run a script in the background even after I logout SSH? How can I run selenium on Linux? As long as I am in my SSH session, everything works as normal. Though, when I exit my SSH, Im getting
no such window: target window already closed from unknown error: web view not found (Session info: chrome-headless-shell=122.0.6261.94) Stacktrace:
Источник: https://stackoverflow.com/questions/780 ... m-on-linux
Мобильная версия