how to login to the alert window when we navigate to the browser through selenium

后端 未结 2 1651
天命终不由人
天命终不由人 2021-01-26 08:34

I have the url which needs credentials and I am navigating to that through selenium + Java https://username:password.example.com/

However it still shows the login window

2条回答
  •  隐瞒了意图╮
    2021-01-26 09:17

    This provides multiple approaches for handling Authentication pop-ups.

    I would suggest to use WebDriver’s switchTo.alert() syntax to access them and then use methods such as sendKeys(), accept() or dismiss()

提交回复
热议问题