Rayrun
← Back to Discord Forum

How to use FirefoxUserPrefs as LaunchOptions on Firefox?

Attempting to use the following code: launchOptions.FirefoxUserPrefs = new Dictionary<string, object>(); launchOptions.FirefoxUserPrefs = launchOptions.FirefoxUserPrefs.Append(new KeyValuePair<string, object>("accessibility.force_disabled", 1)); Yet regardless of what pref I use, I get unsupported value error.

This thread is trying to answer question "Why am I getting an 'unsupported value' error when trying to use FirefoxUserPrefs as LaunchOptions on Firefox, and how can I resolve this?"

1 reply

Figured it out, had to define dictionary with values on a single line for it to work, no idea why the original doesn't work with that kind of error message.

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.