C# 클래스 OpenQA.Selenium.Firefox.FirefoxProfile

Provides the ability to edit the preferences associated with a Firefox profile.
파일 보기 프로젝트 열기: asynchrony/Selenium2 1 사용 예제들

공개 메소드들

메소드 설명
AddExtension ( string extensionToInstall ) : void

Adds a Firefox Extension to this profile

Clean ( ) : void

Cleans this Firefox profile.

If this profile is a named profile that existed prior to launching Firefox, the Clean method removes the WebDriver Firefox extension. If the profile is an anonymous profile, the profile is deleted.

FirefoxProfile ( ) : System

Initializes a new instance of the FirefoxProfile class.

FirefoxProfile ( string profileDirectory ) : System

Initializes a new instance of the FirefoxProfile class using a specific profile directory.

FirefoxProfile ( string profileDirectory, bool deleteSourceOnClean ) : System

Initializes a new instance of the FirefoxProfile class using a specific profile directory.

FromBase64String ( string base64 ) : FirefoxProfile

Converts a base64-encoded string into a FirefoxProfile.

SetPreference ( string name, bool value ) : void

Sets a preference in the profile.

SetPreference ( string name, int value ) : void

Sets a preference in the profile.

SetPreference ( string name, string value ) : void

Sets a preference in the profile.

ToBase64String ( ) : string

Converts the profile into a base64-encoded string.

WriteToDisk ( ) : void

Writes this in-memory representation of a profile to disk.

비공개 메소드들

메소드 설명
AddDefaultPreference ( string>.Dictionary preferences, string name, string value ) : void

Adds a preference to the profile.

AddWebDriverExtension ( ) : void

Adds the WebDriver extension for Firefox to the profile.

DeleteExtensionsCache ( ) : void

Deletes the cache of extensions for this profile, if the cache exists.

If the extensions cache does not exist for this profile, the DeleteExtensionsCache method performs no operations, but succeeds.

DeleteLockFiles ( ) : void

Deletes the lock files for a profile.

GenerateProfileDirectoryName ( ) : string

Generates a random directory name for the profile.

InstallExtensions ( ) : void

Installs all extensions in the profile in the directory on disk.

ReadExistingPreferences ( ) : string>.Dictionary

Reads the existing preferences from the profile.

Assumes that we only really care about the preferences, not the comments

UpdateUserPreferences ( ) : void

Writes the user preferences to the profile.

WriteNewPreferences ( string>.Dictionary preferences ) : void

Writes the specified preferences to the user preferences file.

메소드 상세

AddExtension() 공개 메소드

Adds a Firefox Extension to this profile
public AddExtension ( string extensionToInstall ) : void
extensionToInstall string The path to the new extension
리턴 void

Clean() 공개 메소드

Cleans this Firefox profile.
If this profile is a named profile that existed prior to launching Firefox, the Clean method removes the WebDriver Firefox extension. If the profile is an anonymous profile, the profile is deleted.
public Clean ( ) : void
리턴 void

FirefoxProfile() 공개 메소드

Initializes a new instance of the FirefoxProfile class.
public FirefoxProfile ( ) : System
리턴 System

FirefoxProfile() 공개 메소드

Initializes a new instance of the FirefoxProfile class using a specific profile directory.
public FirefoxProfile ( string profileDirectory ) : System
profileDirectory string The directory containing the profile.
리턴 System

FirefoxProfile() 공개 메소드

Initializes a new instance of the FirefoxProfile class using a specific profile directory.
public FirefoxProfile ( string profileDirectory, bool deleteSourceOnClean ) : System
profileDirectory string The directory containing the profile.
deleteSourceOnClean bool Delete the source directory of the profile upon cleaning.
리턴 System

FromBase64String() 공개 정적인 메소드

Converts a base64-encoded string into a FirefoxProfile.
public static FromBase64String ( string base64 ) : FirefoxProfile
base64 string The base64-encoded string containing the profile contents.
리턴 FirefoxProfile

SetPreference() 공개 메소드

Sets a preference in the profile.
public SetPreference ( string name, bool value ) : void
name string The name of the preference to add.
value bool A value to add to the profile.
리턴 void

SetPreference() 공개 메소드

Sets a preference in the profile.
public SetPreference ( string name, int value ) : void
name string The name of the preference to add.
value int A value to add to the profile.
리턴 void

SetPreference() 공개 메소드

Sets a preference in the profile.
public SetPreference ( string name, string value ) : void
name string The name of the preference to add.
value string A value to add to the profile.
리턴 void

ToBase64String() 공개 메소드

Converts the profile into a base64-encoded string.
public ToBase64String ( ) : string
리턴 string

WriteToDisk() 공개 메소드

Writes this in-memory representation of a profile to disk.
public WriteToDisk ( ) : void
리턴 void