Skip to Content
Menu
This question has been flagged
1575 Views

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
Discard
Related Posts Replies Views Activity
1
Jul 25
1908
2
Jul 25
7454
2
Jul 25
3885
2
Jul 25
3615
2
Jun 25
2235