İçereği Atla
Menü
Bu soru işaretlendi
1581 Görünümler

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Tem 25
1958
2
Tem 25
7501
2
Tem 25
3940
2
Tem 25
3674
2
Haz 25
2280