-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support Opera and Yandex browsers (#134)
- Add section to settings.json for Opera browser - Add specific OperaSettings with w3c workaround and binary location - Update LocalBrowserFactory to separate Opera and Yandex cases from Chrome. For them, use ChromeDriverService with disabled build check
- Loading branch information
Showing
5 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/java/aquality/selenium/configuration/driversettings/OperaSettings.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package aquality.selenium.configuration.driversettings; | ||
|
||
import aquality.selenium.browser.BrowserName; | ||
import aquality.selenium.core.utilities.ISettingsFile; | ||
import org.openqa.selenium.chrome.ChromeOptions; | ||
import org.openqa.selenium.remote.AbstractDriverOptions; | ||
|
||
public class OperaSettings extends ChromeSettings { | ||
private static final String DEFAULT_BINARY_LOCATION = "%USERPROFILE%\\AppData\\Local\\Programs\\Opera\\launcher.exe"; | ||
public OperaSettings(ISettingsFile settingsFile) { | ||
super(settingsFile); | ||
} | ||
|
||
@Override | ||
public AbstractDriverOptions<?> getDriverOptions() { | ||
ChromeOptions options = (ChromeOptions) super.getDriverOptions(); | ||
options.setExperimentalOption("w3c", true); | ||
options.setBinary(getBinaryLocation(DEFAULT_BINARY_LOCATION)); | ||
return options; | ||
} | ||
|
||
@Override | ||
public BrowserName getBrowserName() { | ||
return BrowserName.OPERA; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters