Webtips

Explore the world of web technologies through a series of tutorials

Follow publication

Member-only story

Run your tests in Safari without a MAC

Sajitha Pathirana
Webtips
Published in
3 min readSep 26, 2021

--

Photo by sutirta budiman on Unsplash

How to use Safari Docker container for test execution

<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>5.0.3</version>
</dependency>
WebDriverManager wdm = WebDriverManager.chromedriver().browserInDocker();
WebDriver driver = wdm.create();
@Test
public void safari() throws Exception {
driver = BrowserFactory.getBrowser("safari");
driver.manage().window().maximize();
driver.get("https://www.google.com/");
}

--

--

Webtips
Webtips

Published in Webtips

Explore the world of web technologies through a series of tutorials

Sajitha Pathirana
Sajitha Pathirana

Written by Sajitha Pathirana

A Test automation enthusiast, passionate to help the teams to enhance their testing journey with his decade of experience in the field.

No responses yet

Write a response