Created
December 18, 2024 17:13
-
-
Save borodicht/1f1f85ad35fcc9406b57994fa2a3d8df 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
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
import org.testng.annotations.AfterMethod; | |
import org.testng.annotations.BeforeMethod; | |
import java.time.Duration; | |
public class BaseTest { | |
WebDriver driver; | |
@BeforeMethod | |
public void setup() { | |
driver = new ChromeDriver(); | |
driver.manage().window().maximize(); | |
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(20)); | |
driver.get("https://www.saucedemo.com/"); | |
} | |
@AfterMethod(alwaysRun = true) | |
public void close() { | |
driver.quit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment