# Webdriver cannot set preference to Firefox

**URL:** <https://discourse.haskell.org/t/webdriver-cannot-set-preference-to-firefox/1296>\
**Category:** Uncategorized\
**Created:** [June 16, 2020, 7:08am UTC](https://discourse.haskell.org/t/webdriver-cannot-set-preference-to-firefox/1296 "2020-06-16T07:08:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![notooth](https://avatars.discourse-cdn.com/v4/letter/n/ce73a5/32.png) [@notooth](https://discourse.haskell.org/u/notooth)\
**Post date:** [June 16, 2020, 7:08am UTC](https://discourse.haskell.org/t/webdriver-cannot-set-preference-to-firefox/1296/1 "2020-06-16T07:08:39Z")

</div>

Hello,

I was trying to set a preference “network.proxy.type”=1 to Firefox with this code:

> ```
> {-# LANGUAGE OverloadedStrings #-}
> 
> module Main where
> 
> import Test.WebDriver
> import Test.WebDriver.Firefox.Profile
> 
> main :: IO ()
> main = do
> let profile = addPref "network.proxy.type" (PrefInteger 1) defaultProfile
> preparedProfile <- prepareProfile profile
> let config = defaultConfig {wdCapabilities = defaultCaps {browser = firefox {ffProfile = Just preparedProfile}}}
> runSession config $ return ()
> 
> ```

When the code run, Firefox opened up, and I went to “about:config” and searched for “network.proxy.type”. It said that “network.proxy.type” = 5. What did I do wrong?
