I'm new to coded UI testing, can someone help me on how to retrieve a textbox value as I keep on getting null value. I added an assertion to my method which validates the value of a textbox, however if keeps on failing since the actual data is always null. Below is my sample code. Thanks in advance for the help.
Here is my test method in the CodeUItest class
[TestMethod]
public void TBParameterTest()
{
this.UIMap.ValidateTBValue();
}
public void ValidateTBValue()
{
#region Variable Declarations
WinEdit uIItemEdit = this.UIContigoWindow.UIItemCell.UIItemEdit;
#endregion
// Verify that the 'Text' property of text box equals '1200'
Assert.AreEqual(this.ValidateTBValueExpectedValues.UIItemEditText, uIItemEdit.Text, "Not equal to previous value when parameter is not yet modified");
}
the uIItemEdit.Text is always null even if the value in the webpage is equal to 1200.
Thanks!