Created
June 13, 2024 16:50
-
-
Save SarahElson/b04db1f40db2c4505a5473d042353cda to your computer and use it in GitHub Desktop.
How To Handle Authentication PopUps in Selenium WebDriver
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 LocalGrid; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
import org.testng.annotations.*; | |
public class BaseTest { | |
public static WebDriver driver; | |
String username = "admin"; | |
String password = "admin"; | |
@BeforeClass | |
public void setDriver() { | |
driver = new ChromeDriver(); | |
} | |
@AfterClass | |
public void tearDown() { | |
driver.quit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment