Ejemplo n.º 1
0
        private void TextBoxActions(ITextBox TextBox)
        {
            switch (ElementAction)
            {
            case eElementAction.SetValue:
                TextBox.SetValue(Value);
                break;

            case eElementAction.GetValue:
                AOVs.Add(new NodeActionOutputValue()
                {
                    Param = "Actual", Value = TextBox.GetValue()
                });
                break;

            case eElementAction.GetTextLength:
                AOVs.Add(new NodeActionOutputValue()
                {
                    Param = "Actual", Value = TextBox.GetTextLength()
                });
                break;

            case eElementAction.SendKeys:
                TextBox.SendKeys(Value);
                break;

            case eElementAction.SetText:
                TextBox.SetText(Value);
                break;

            case eElementAction.GetText:
                string txt = TextBox.GetText();
                AOVs.Add(new NodeActionOutputValue()
                {
                    Param = "Actual", Value = txt
                });
                break;

            case eElementAction.GetFont:
                AOVs.Add(new NodeActionOutputValue()
                {
                    Param = "Actual", Value = TextBox.GetFont()
                });
                break;

            case eElementAction.ClearValue:
                TextBox.ClearValue();
                break;

            case eElementAction.IsValuePopulated:
                AOVs.Add(new NodeActionOutputValue()
                {
                    Param = "Actual", Value = TextBox.IsValuePopulated()
                });

                break;
            }
        }
Ejemplo n.º 2
0
        public bool EnterCredentials(string username, string password)
        {
            var usernameBox = UsernameBox;

            usernameBox.SendKeys(username);
            PasswordBox.SendKeys(password);
            // Cannot compare password as it is masked.
            return(usernameBox.Value.Equals(username));
        }
Ejemplo n.º 3
0
 public LoginScreen SetUsername(string username)
 {
     usernameTxb.SendKeys(username);
     return(this);
 }
 public void Should_SendKeys()
 {
     rightArgumentTextBox.SendKeys(ExpectedValue);
     Assert.AreEqual(ExpectedValue, rightArgumentTextBox.Value);
 }