Boa tarde Ao rodar o teste no linux mint aparece esse erro, tentei seguir os links que mostraram em um post coma mesma dúvida aqui(https://stackoverflow.com/questions/37004635/python-selenium-exception-attributeerror-service-object-has-no-attribute-pr), mas não deu certo, tentei várias outras coisas mas o erro persiste erro:
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
E
======================================================================
ERROR: test_para_verificar_se_a_janela_do_browser_esta_ok (setup.tests.AnimaisTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/leandro/Desktop/estudos/curso03/setup/tests.py", line 13, in setUp
driver = webdriver.Chrome(service=Service('/home/leandro/Desktop/estudos/curso03/'))
File "/home/leandro/.pyenv/versions/curso3/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 89, in __init__
keep_alive,
File "/home/leandro/.pyenv/versions/curso3/lib/python3.7/site-packages/selenium/webdriver/chromium/webdriver.py", line 101, in __init__
self.service.start()
File "/home/leandro/.pyenv/versions/curso3/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 104, in start
self.assert_process_still_running()
File "/home/leandro/.pyenv/versions/curso3/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 115, in assert_process_still_running
return_code = self.process.poll()
AttributeError: 'Service' object has no attribute 'process'
tests.py:
import os
from django.test import LiveServerTestCase
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
import os
class AnimaisTestCase(LiveServerTestCase):
def setUp(self):
driver = webdriver.Chrome(service=Service('/home/leandro/Desktop/estudos/curso03/'))
self.browser = webdriver.Chrome(driver)
def tearDown(self):
self.browser.quit()
def test_para_verificar_se_a_janela_do_browser_esta_ok(self):
self.browser.get('https://www.alura.com.br')