I tried Using below code but not worked.
WebDriverWait wait = new WebDriverWait(driver, 2); wait.until(ExpectedConditions.alertIsPresent()); Alert alert = driver.switchTo().alert(); alert.sendKeys("Uname" + Keys.TAB + "pwd"); alert.accept();
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It only takes a minute to sign up.Sign up to join this community
Verify the popup present after the landing page loaded,if popup presents use
getcurrenturl method and concatenate the username and password with the current url.