SyntaxFix
Write A Post
Hire A Developer
Questions
Try following solution and let me know in case of any issues:
driver.get('https://example.com/') driver.switchTo().alert().sendKeys("username" + Keys.TAB + "password"); driver.switchTo().alert().accept();
This is working fine for me