FirefoxProfile class

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.
no setterinherited
prefs List<PrefsOption>
The read-only settings of the prefs.js file of the profile directory.
no setter
profileDirectory Directory?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userPrefs List<PrefsOption>
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent 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. Returns true 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'} where xxxxx is the zipped and base64 encoded content of the files in profileDirectory if one was pased. The files prefs.js and user.js are generated from the content of prefs and userPrefs. It can be uses like var 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.