Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

тестовый скрипт для Windows не заработал #22

Open
IgorLytkin opened this issue Jun 18, 2024 · 1 comment
Open

Comments

@IgorLytkin
Copy link

Предлагаемый тестовый скрипт выдает ошибку
Python 3.12.4 (tags/v3.12.4:8e8a4ba, Jun 6 2024, 19:30:16) [MSC v.1940 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

from selenium import webdriver
options = webdriver.ChromeOptions()
binary_yandex_driver_file = 'yandexdriver.exe' # path to YandexDriver
driver = webdriver.Chrome(binary_yandex_driver_file, options=options)
Traceback (most recent call last):
File "", line 1, in
TypeError: WebDriver.init() got multiple values for argument 'options'

Заменил тестовый скрипт на
from selenium import webdriver
from selenium.webdriver.chrome.service import Service

service = Service(executable_path=r"c:\yandexdriver\yandexdriver.exe")
driver = webdriver.Chrome(service=service)
driver.get('https://yandex.ru')

@carelesssava
Copy link

Ознакомьтесь с pr, там правильный код

#26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants