c# - Login popup and Selenium -
i'm trying access website start selenium scripting. put website's link pops window asking username , password.
i can't selenium. see tried in code , didnt work out.
any ideas?
using system; using system.collections.generic; using system.linq; using system.text; using system.threading.tasks; using openqa.selenium; using openqa.selenium.firefox; using openqa.selenium.support.ui; using system.collections.objectmodel; using system.threading; using system.io; using openqa.selenium.interactions; namespace crmtest1withselenium { class program { static void main(string[] args) { iwebdriver driver = null; driver = new firefoxdriver(); string credentials = convert.tobase64string(encoding.ascii.getbytes("username" + ":" + "password")); string url = "http://" + credentials+ "@" + "bfaz-testcrm.cloudapp.net/bathfittercrmtest"; driver.navigate().gotourl(url); driver.manage().window.maximize(); } } }
if mean http basic authentication
, solution written here:
Comments
Post a Comment