Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class WebLoginPage{
- IWebDriver driver;
- public WebLoginPage(IWebDriver driver)
- {
- this.driver = driver;
- PageFactory.InitElements(driver, this);
- }
- [FindsBy(How = How.Id, Using = "login")]
- private IWebElement tLogin;
- [FindsBy(How = How.Id, Using = "pass")]
- private IWebElement tPassword;
- [FindsBy(How = How.Id, Using = "enterSite")]
- private IWebElement bLogin;
- public void enterLogin(string login)
- {
- tLogin.SendKeys(login);
- }
- public void enterPassword(string password)
- {
- tPassword.SendKeys(password);
- }
- public void clickLoginButton()
- {
- bLogin.Click();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement