public void SetTextBoxTextTwice() { //arrange string txt1 = "123"; string txt2 = "456"; //Act ITextBox GWE = (ITextBox)Service.LocateWebElement.LocateElementByID(eElementType.TextBox, "GingerPhone"); GWE.SetText(txt1); GWE.SetText(txt2); string value = GWE.GetText(); //Assert Assert.AreEqual(txt2, value, "Set value and get value are equel"); }
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; } }