0
我已經開始學習selenium網絡驅動程序。我遇到過一個問題。當我導航到我的URI時,在訪問我的網頁之前,我遇到了一個Windows身份驗證窗口。我使用C#作爲腳本。我已經得到了我應該使用的代碼:FindElementsBy用戶名和密碼的編號
// Get the page elements
var userNameField = driver.FindElementById("usr");
var userPasswordField = driver.FindElementById("pwd");
var loginButton = driver.FindElementByXPath("//input[@value='Login']");
// Type user name and password
userNameField.SendKeys("admin");
userPasswordField.SendKeys("12345");
但是,如果您有正常的登錄頁面,我無法到達元素或獲取Fire Path id,因爲窗口身份驗證彈出窗口不會讓我。有人可以幫助我這個。如何使這個過程自動化
感謝