.Contains("text") question
Posted: Tue Oct 02, 2012 7:53 pm
I'm iterating through rows. I need to verify that each row contains specific text. I need to ensure that when this is iterating through rows it verifies that one of the cells contains "created". I tried tag.contains("created") and other derivatives. Any help?
Also tried this from the GUI. Trying to evaluate this cell contains either Created or Ready.
Code: Select all
int counter = 0;
var grid =rgMasterTable;
IList<Ranorex.TrTag> myList = grid.FindDescendants<Ranorex.TrTag>();
foreach(Ranorex.TrTag tag in myList )
{
if(tag != null)
{
myList[1].Click();
tag.MoveTo();
Validate.Exists(tag);
Report.Info(tag.InnerText);
}
//Ranorex.Mouse.Click();
//tag.Click(Location.CenterLeft);
if (counter == 51)
{
break;
}
}
//NativeWindow();
counter++;
}
Code: Select all
public void Validate_QARequestID()
{
if(repo.IDInfo.Exists())
{
Validate.Attribute(repo.Info, "InnerText", "Created") || Validate.Attribute(repo.IDInfo, "InnerText", "Ready");
}
}