|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.opera.core.systems.OperaProfile
public class OperaProfile
OperaProfile is an interface representing a profile (commonly a profile directory) for the Opera
web browser. It's typically used by passing in an instance object of this class to the
"opera.profile" capability at construction of OperaDriver, like this:
DesiredCapabilities capabilities = DesiredCapabilities.opera();
OperaProfile profile = new OperaProfile();
profile.preferences().set("foo", "bar", "baz");
capabilities.setCapability("opera.profile", profile);
WebDriver driver = new OperaDriver(capabilities);
Or by passing it in as an object directly to OperaDriver's constructor:
OperaProfile profile = new OperaProfile();
profile.preferences().set("foo", "bar", "baz");
WebDriver driver = new OperaDriver(profile);
Among Opera's command-line arguments the profile may be referred to as "pd", short for "personal
directory".
OperaPreferences| Constructor Summary | |
|---|---|
OperaProfile()
Creates a new, fresh random profile for Opera to use. |
|
OperaProfile(File profileDirectory)
Creates a representation of the profile in the given directory. |
|
OperaProfile(String profileDirectoryPath)
Creates a representation of the profile in the given directory path. |
|
| Method Summary | |
|---|---|
void |
cleanUp()
Cleans up the profile. |
org.openqa.selenium.remote.DesiredCapabilities |
getCapabilities()
Returns a new DesiredCapabilities object with OperaDriver defaults and this profile set
on the opera.profile capability. |
File |
getDirectory()
Gets the current profile directory. |
OperaPreferences |
preferences()
Allows access to the preferences in the current profile. |
void |
setPreferences(OperaPreferences newPreferences)
Replaces the preferences in the profile with the given preferences. |
String |
toJson()
Converts this instance to its JSON representation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OperaProfile()
-pd command-line argument, such as
Opera Desktop. core-gogi and Opera Mobile is not supported.
public OperaProfile(String profileDirectoryPath)
profileDirectoryPath - the path to the profile directory to usepublic OperaProfile(File profileDirectory)
profileDirectory - the profile to use
IllegalArgumentException - if profileDirectory is not set| Method Detail |
|---|
public OperaPreferences preferences()
OperaPreferences object representing preferences in the current profilepublic void setPreferences(OperaPreferences newPreferences)
newPreferences - the new preferences to populate the profile withpublic File getDirectory()
public void cleanUp()
public org.openqa.selenium.remote.DesiredCapabilities getCapabilities()
DesiredCapabilities object with OperaDriver defaults and this profile set
on the opera.profile capability.
public String toJson()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||