Skip to content

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

@IgorLytkin

Description

@IgorLytkin

Предлагаемый тестовый скрипт выдает ошибку
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')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions