How to handle authentication popup with Selenium WebDriver using Java

前端 未结 7 1793
伪装坚强ぢ
伪装坚强ぢ 2020-11-22 05:36

I\'m trying to handle authentication popup using the code below:

FirefoxProfile profile = new FirefoxProfile();
profile.setPreference(\"network.http.phishy-u         


        
7条回答
  •  北恋
    北恋 (楼主)
    2020-11-22 06:12

    I faced this issue a number of times in my application.

    We can generally handle this with the below 2 approaches.

    1. Pass the username and password in url itself

    2. You can create an AutoIT Script and call script before opening the url.

    Please check the below article in which I have mentioned both ways:
    Handle Authentication/Login window in Selenium Webdriver

提交回复
热议问题