Skip to content

how to disable save password popup #92

Closed Answered by kaliiiiiiiiii
gouravkumar99 asked this question in Q&A
Discussion options

You must be logged in to vote

@gouravkumar99
Update:
smth like:

import os.path

from selenium_driverless import webdriver
import asyncio
import json
from functools import reduce


def prefs_to_json(dot_prefs: dict):
    # prefs as {key:value}
    # for example {"profile.default_content_setting_values.images": 2}
    def undot_key(key, value):
        if "." in key:
            key, rest = key.split(".", 1)
            value = undot_key(rest, value)
        return {key: value}

    # undot prefs dict keys
    undot_prefs = reduce(
        lambda d1, d2: {**d1, **d2},  # merge dicts
        (undot_key(key, value) for key, value in dot_prefs.items()),
    )
    return undot_prefs


def write_prefs(prefs: dict, prefs_path: 

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by kaliiiiiiiiii
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #91 on October 19, 2023 11:56.