Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include test example using Chrome beta and .browserPath() (issue #548)
- Loading branch information
1 parent
ab2b726
commit 7bce900
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
src/test/java/io/github/bonigarcia/wdm/test/chrome/ChromeBetaTest.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,55 @@ | ||
/* | ||
* (C) Copyright 2020 Boni Garcia (http://bonigarcia.github.io/) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
package io.github.bonigarcia.wdm.test.chrome; | ||
|
||
import static org.junit.Assume.assumeTrue; | ||
|
||
import java.io.File; | ||
|
||
import org.junit.Before; | ||
import org.junit.BeforeClass; | ||
import org.openqa.selenium.chrome.ChromeDriver; | ||
import org.openqa.selenium.chrome.ChromeOptions; | ||
|
||
import io.github.bonigarcia.wdm.WebDriverManager; | ||
import io.github.bonigarcia.wdm.test.base.BrowserTestParent; | ||
|
||
/** | ||
* Test with Google Chrome beta version. | ||
* | ||
* @author Boni Garcia (boni.gg@gmail.com) | ||
* @since 4.2.0 | ||
*/ | ||
public class ChromeBetaTest extends BrowserTestParent { | ||
|
||
static String chromeBetaPath = "/usr/bin/google-chrome-beta"; | ||
static File chromeBetaFile = new File(chromeBetaPath); | ||
|
||
@BeforeClass | ||
public static void setupClass() { | ||
assumeTrue(chromeBetaFile.exists()); | ||
WebDriverManager.chromedriver().browserPath(chromeBetaPath).setup(); | ||
} | ||
|
||
@Before | ||
public void setupTest() { | ||
ChromeOptions chromeOptions = new ChromeOptions(); | ||
chromeOptions.setBinary(chromeBetaPath); | ||
driver = new ChromeDriver(chromeOptions); | ||
} | ||
|
||
} |