-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed as not planned
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!I-enhancementSomething could be betterSomething could be better
Description
Feature and motivation
I would like to be able to get the value of a preference set in about:config dynamically. These are set when instantiating a driver via Options[:prefs] values). I'd also like to be able to dynamically set a preference.
The JS API for Firefox prefs seems straightforward. I do note that Firefox CDP is being deprecated IFO BiDi, could someone confirm whether this JS API is part of that scope or not?
Usage example
From your own Ruby tests I see here that you get a preference value like so, by passing a JS string to the Driver#execute_script method.
dir = driver.execute_script("return Services.prefs.getStringPref('browser.download.dir')")Something like this would be much better:
driver.pref['browser.download.dir']
# => ""And the equivalent to set a pref value:
driver.pref['browser.download.dir'] = 'foo/bar'
driver.pref['browser.download.dir']
# => "/foo/bar"Metadata
Metadata
Assignees
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!I-enhancementSomething could be betterSomething could be better