Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1600 Widoki

hello everyone, I am experimenting with a program to run selenium from a wizard in odoo to send messages+attachments via whatsapp, but I get the following error: selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/chromedriver unexpectedly exited. Status code was: -5


I share my code, any ideas or suggestions on how to solve the error would be of great help, or some other option to run selenium outside of odoo,


Thank you very much in advance.


Here is my code:

from selenium import webdriver

from selenium.webdriver.chrome.options import Options

from selenium.webdriver.common.by import By

from selenium.webdriver.common.keys import Keys

from selenium.webdriver.support import expected_conditions

from selenium.webdriver.support.ui import WebDriverWait

from webdriver_manager.chrome import ChromeDriverManager

from selenium.webdriver.chrome.service import Service as ChromeService


service = ChromeService()

browser = webdriver.Chrome(service=service)

browser.maximize_window()

phone = "my_phone_number"

message = 'Hi There. This is test message from PythonCircle.com'

browser.get("https://web.whatsapp.com/send?phone={phone}&text&type=phone_number&app_absent=1".format(phone=phone))

time.sleep(3)

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
lip 25
2080
2
lip 25
7582
2
lip 25
4017
2
lip 25
3772
2
cze 25
2367