Esempio n. 1
0
 public MainPage ChangeCity(string city)
 {
     pageElementsActions.InputDataInTheField(City, city);
     mouseActions.MoveMouseTo(WebDriver, CityResult);
     mouseActions.MouseClick(WebDriver, CityResult);
     return(new MainPage(WebDriver));
 }
Esempio n. 2
0
        public String  PerformLogin(String UsernameValue, String PasssworValue, String ExpectedResult)
        {
            try
            {
                GenericControl obj      = new GenericControl(browser);
                UITestControl  Username = obj.FindControl <HtmlEdit>(UsernNameLocatorType, UsernNameLocatorValue);
                KeyboardActions.SendKeys(Username, UsernameValue, browser);
                UITestControl Submit = obj.FindControl <HtmlInputButton>(SubmitLocatordType, SubmitLocatorValue);
                MouseActions.MouseClick(Submit, browser);
                UITestControl Password = obj.FindControl <HtmlEdit>(PassworLocatordType, PassworLocatordValue);
                KeyboardActions.SendKeys(Password, PasssworValue, browser);
                UITestControl Login = obj.FindControl <HtmlInputButton>(SubmitLocatordType, SubmitLocatorValue);
                MouseActions.MouseClick(Login, browser);

                return(ActualResult = ExpectedResult);
            }

            catch (Exception e)
            {
                return(ActualResult = e.Message);
            }
        }