kaliiiiiiiiii/Selenium-Driverless

EXTENSION IN INCOGNITO METHOD FAILS

Closed this issue · 9 comments

image
image

options = webdriver.ChromeOptions()
options.add_argument('--incognito')
# options.add_argument(f'--user-data-dir={userdata}')
options.add_extension(r'extension')
with webdriver.Chrome(options=options) as driver:
    driver.get('https://nopecha.com/demo/recaptcha', wait_load=True, timeout=10)
    driver.ensure_extensions_incognito_allowed()
    driver.maximize_window()

    driver.sleep(100)
    title = driver.title
    url = driver.current_url
    source = driver.page_source

enssure_extensions_allowed is only supported while there is a non-incognito window open

enssure_extensions_allowed is only supported while there is a non-incognito window open

how to use extension in incognito then?

use contexts
There's an example in the readme
You can also later close the main context, if you decide that you don't need it anymore

use contexts There's an example in the readme You can also later close the main context, if you decide that you don't need it anymore

i saw it but not satisfied, if we launch normal context is it just incognito version, one without user directory?

also if there is something like page.route() in playwright, for selenium driverless, cause selenium driverless is better

use contexts There's an example in the readme You can also later close the main context, if you decide that you don't need it anymore

i saw it but not satisfied, if we launch normal context is it just incognito version, one without user directory?

yeah, as I said

also if there is something like page.route() in playwright, for selenium driverless, cause selenium driverless is better

it's right there in the documentation & readme

it's right there in the documentation & readme

it not works with sync, is sync support not yet added?

it's right there in the documentation & readme

it not works with sync, is sync support not yet added?

yep