Пример #1
0
        public void Login(String userName, String password)
        {
            //  PropertiesCollection.WebText(TxtCWSId, userName); // by using properties collection item
            // PropertiesCollection.HighLightElement(BrowserFactory.Driver, TxtCWSId);
            // PropertiesCollection.Wait_ElementToBeClickable(TxtCWSId, 30);
            TxtCWSId.Wait_ElmToBeDisplayed(30);
            Assert.AreEqual(true, TxtCWSId.Displayed, "Field Username is displayed");
            Assert.AreEqual(true, TxtCWPswd.Displayed, "Field Username is displayed");
            Assert.AreEqual(true, BtnLogin.Displayed, "Field Username is displayed");

            TxtCWSId.HighLightElement();
            TxtCWSId.EnterText(userName);
            LOGGER.Info("Username has been Entered");
            TxtCWPswd.HighLightElement();
            TxtCWPswd.EnterText(password);
            LOGGER.Info("Password has been Entered");
            System.Threading.Thread.Sleep(2000);
            BtnLogin.HighLightElement();
            BtnLogin.WebClick();
            LOGGER.Info("CWS login button has been clicked");
            // System.Threading.Thread.Sleep(5000);
            //Dropdown.Wait_ElmToBeDisplayed();
            Dropdown.Wait_ElmToBeDisplayed(30);
        }