I'm using Selenium and webDriver and C#. I want to write some code to access a webpage automatically. And there will popup an authorize window (two input control, ex.user should press "admin" and password "admin", then click button "OK").
My code is:
IAlert alert = driver.SwitchTo().Alert();
alert.Sendkeys("admin");
alert.Sendkeys("\t"); // it not works. FAILED!
alert.Sendkeys("admin");
alert.Accept();`
My Question is how can I enter name/password into the popup window correctly? How Selenium handle the popup window like these?
Any comments are welcome.