Handling Authentication required dialog using Winium with C# for Chrome Browser (Best)
// Sending user name on Authentication required dialog
Your WiniumObject.FindElementsByName("Username").SendKeys(Your user name);
System.Windows.Forms.SendKeys.SendWait("{TAB}"); // Not mandatory
// Sending password on Authentication required dialog
Your WiniumObject.FindElementsByName("Password").SendKeys(Your password);
System.Windows.Forms.SendKeys.SendWait("{TAB}"); // Not mandatory
// Click on Sign in button
System.Windows.Forms.SendKeys.SendWait("{ENTER}"); or
Your WiniumObject.FindElementsByName("Sign in").Click
// Sending user name on Authentication required dialog
Your WiniumObject.FindElementsByName("Username").SendKeys(Your user name);
System.Windows.Forms.SendKeys.SendWait("{TAB}"); // Not mandatory
// Sending password on Authentication required dialog
Your WiniumObject.FindElementsByName("Password").SendKeys(Your password);
System.Windows.Forms.SendKeys.SendWait("{TAB}"); // Not mandatory
// Click on Sign in button
System.Windows.Forms.SendKeys.SendWait("{ENTER}"); or
Your WiniumObject.FindElementsByName("Sign in").Click
No comments:
Post a Comment