Created
January 12, 2026 09:35
-
-
Save borodicht/2ed8b526dd88984ceddad1721100f39b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| package org.demo.ui; | |
| import org.openqa.selenium.WebDriver; | |
| import org.openqa.selenium.chrome.ChromeDriver; | |
| import org.openqa.selenium.chrome.ChromeOptions; | |
| import org.testng.annotations.AfterMethod; | |
| import org.testng.annotations.BeforeMethod; | |
| public class BaseUiTest { | |
| protected WebDriver driver; | |
| @BeforeMethod | |
| public void setUp() { | |
| ChromeOptions options = new ChromeOptions(); | |
| options.addArguments("--headless=new"); | |
| options.addArguments("--no-sandbox"); | |
| options.addArguments("--disable-dev-shm-usage"); | |
| driver = new ChromeDriver(options); | |
| driver.manage().window().maximize(); | |
| } | |
| @AfterMethod | |
| public void tearDown() { | |
| if (driver != null) driver.quit(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment