FirefoxProfile class Null safety
Creates a Firefox profile in a format so it can be passed using the
desired
capabilities map.
Constructors
- FirefoxProfile({Directory? profileDirectory})
- Creates a new FirefoxProfile.
Properties
- hashCode → int
-
The hash code for this object.
read-onlyinherited
-
prefs
→ List<
PrefsOption> -
The read-only settings of the
prefs.js
file of the profile directory.read-only - profileDirectory → Directory?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
-
userPrefs
→ List<
PrefsOption> -
read-only
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
removeOption(
String name) → bool -
Remove the option named
name
from userPrefs. If lockedPrefs contains this option it will not be removed. Returnstrue
if userPrefs was removed,false
if it was not removed because userPrefs doesn't contain it because lockedPrefs contains it. -
setOption(
PrefsOption option) → bool -
Add an option or replace an option if one already exists with the same
name.
If option exists in lockedPrefs it will not be added.
Returns
true
if userPrefs was updated,false
otherwise. -
toJson(
) → Map< String, dynamic> -
Creates a map like
{'browserName: 'firefox', 'firefox_profile': 'xxxxx'}
wherexxxxx
is the zipped and base64 encoded content of the files in profileDirectory if one was pased. The filesprefs.js
anduser.js
are generated from the content ofprefs
anduserPrefs
. It can be uses likevar desired = Capabilities.firefox..addAll(firefoxProfile.toJson()}
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
loadPrefsFile(
File file) → Set< PrefsOption> -
Load a prefs file and parse the content into a set of
PrefsOption
. For lines which can't be properly parsed a message is printed and the line is otherwise ignored. Comments, lines starting with//
are silently ignored.