Ir al contenido
Menú
Se marcó esta pregunta
1352 Vistas

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)

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
may 25
12
2
ene 25
2564
1
dic 24
6241
1
nov 24
2723
1
nov 24
2022