hello,
I want to make a common code which pick some data from webtable from different webpages. Here the webpages consist identical table .
This is an example in which I am picking data from ReportingReportTable . And the table present on RoleAssignment page.
So I want to use this code for different pages where table is identical . Is it possible without mentioning page we can traverse on any page and pick data?
[CodedStep(@"Verify element 'ReportingReportTable' 'is' visible.")]
public void check_CodedStep()
{
foreach (HtmlTableRow row in Pages.RoleAssignment.ReportingReportTable.AllRows)
{
if (row.Cells[1].InnerText.Equals("test, hr"))
{
row.Cells[1].AssertContent().InnerText(ArtOfTest.Common.StringCompareType.Contains,"test, hr");
row.Cells[2].AssertContent().InnerText(ArtOfTest.Common.StringCompareType.Contains,"hr1");
row.Cells[3].AssertContent().InnerText(ArtOfTest.Common.StringCompareType.Contains,"NFCEXAMPLE");
row.Cells[4].AssertContent().InnerText(ArtOfTest.Common.StringCompareType.Contains,"NFCEXAMPLE - NFCExample-Description");
break;
}
else
{
Pages.RoleAssignment.NextPageSubmit.Click(false);
}
}
}