Have a script to go to the website. Now I want to login and proceed to next screen. Can't find code on how to go to 'username:' text box, then 'password:' text box.
You will need to give us some HTML of the page, but given a password textbox like this:
<input type="password" id="passwordTextBox">
I'd find it using Selenium's WebDriver like so:
IWebDriver firefoxDriver = new FirefoxDriver();
IWebElement passwordTextBox = firefoxDriver.FindElement(By.Id("passwordTextBox"));
I would then 'write' into it like so:
passwordTextBox.Clear();
passwordTextBox.SendKeys("password");
I would take a look at the Selenium Web Driver documentation, and ask any questions after you've read through it all:
http://seleniumhq.org/docs/03_webdriver.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With