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

browser restarts after clicking on settings button #10

Open
x1nas opened this issue Aug 15, 2021 · 7 comments
Open

browser restarts after clicking on settings button #10

x1nas opened this issue Aug 15, 2021 · 7 comments

Comments

@x1nas
Copy link

x1nas commented Aug 15, 2021

browser restarts after clicking on settings button

browser build: 21.6.4.787
yandexdriver build: 21.6.0.620
win10

@x1nas
Copy link
Author

x1nas commented Aug 20, 2021

Same problems with

browser build: 21.8.0.1373
yandexdriver build 21.8.0.1373
win10

@nazarov-ae
Copy link

Similar problem.
The browser closes after clicking the settings button.

browser: 22.3.1.922 stable (64-bit)
yandexdriver: 22.3.1.899
os: ubuntu 20.04

@PetrovVadim
Copy link

Could you please give me a code snippet for this case ?

@nazarov-ae
Copy link

nazarov-ae commented Apr 30, 2022

Could you please give me a code snippet for this case ?

    binary_driver_file = './_bin/yandexdriver'
    options = webdriver.ChromeOptions()
    service = Service(binary_driver_file)
    driver = webdriver.Chrome(service=service, options=options)
    driver.get('https://yandex.ru')
    sleep(300)

@x1nas
Copy link
Author

x1nas commented May 7, 2022

Could you please give me a code snippet for this case ?

Не нашел, как именно автоматизировать нажатие на кнопку настроек.
Но если просто открыть браузер с помощью webdriver и нажать на кнопку настроек вручную - то окно закрывается, и возникает ошибка:
"Произошла ошибка, Яндекс.Браузер не может продолжить работу. Перезапустить?"
Нажатие на другие кнопки в браузере не приводит к такому поведению.

@x1nas
Copy link
Author

x1nas commented May 7, 2022

mstsc_LNFf6HV5gv.mp4

@x1nas
Copy link
Author

x1nas commented May 7, 2022

Нашел от чего зависит:
С опцией "ya.sync_state_view": {"show": False} - при нажатии на кнопку настроек не вылетает.

Яндекс.Браузер 22.3.3.855
YandexDriver 22.3.0-stable
ОС: Win10

Python:

def run_browser():
    driver_path = 'C:/yandexdriver/yandexdriver.exe'
    browser_path = 'C:/Users/test/AppData/Local/Yandex/YandexBrowser/Application/browser.exe'
    options = webdriver.ChromeOptions()
    options.binary_location = browser_path
    prefs = {
        "ya.sync_state_view": {"show": False},
    }
    options.add_experimental_option("prefs", prefs)
    b = webdriver.Chrome(
        executable_path=driver_path,
        options=options,
    )
    return b

b = run_browser()

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

3 participants