private List <String[]> VerifyActions() { List <string[]> result = new List <string[]>(); actiondata = CSVReaderDataTable.GetCSVData("CommonContent", pageName, "actions"); for (int i = 0; i < actiondata.Count; i++) { string elementname = actiondata.ElementAt(i)[2]; string elementlocatorname = actiondata.ElementAt(i)[3]; string expectedtext = actiondata.ElementAt(i)[4]; string actualtext = SeleniumKeywords.GetText(pageName, elementlocatorname); bool textmatch = SeleniumKeywords.VerifyTextContains(actualtext, expectedtext); string msg = "Element: " + elementname + "Expected: " + expectedtext + "Actual: " + actualtext; result.Add(new string[] { msg, textmatch.ToString() }); } return(result); }
private List <String[]> VerifyRemoveScreen() { System.Threading.Thread.Sleep(4000); List <string[]> result = new List <string[]>(); remove = CSVReaderDataTable.GetCSVData("CommonContent", pageName, "plan"); for (int i = 0; i < remove.Count; i++) { string elementname = remove.ElementAt(i)[2]; string elementlocatorname = remove.ElementAt(i)[3]; string expectedtext = remove.ElementAt(i)[4]; string actualtext = SeleniumKeywords.GetText(pageName, elementlocatorname); bool textmatch = SeleniumKeywords.VerifyTextContains(actualtext, expectedtext); string msg = "Element: " + elementname + "Expected: " + expectedtext + "Actual: " + actualtext; result.Add(new string[] { msg, textmatch.ToString() }); } return(result); }
public List <string[]> VerifyHeader() { List <string[]> ExpectedText = new List <string[]>(); ExpectedText = CSVReaderDataTable.GetCSVData("CommonContent", pageName, "header"); Console.WriteLine("ExpectedText length : " + ExpectedText.Count); List <string[]> result = new List <string[]>(); for (int i = 0; i < ExpectedText.Count; i++) { string elementname = ExpectedText.ElementAt(i)[2]; string locatorname = ExpectedText.ElementAt(i)[3]; string expectedtext = ExpectedText.ElementAt(i)[4]; string actualtext = SeleniumKeywords.GetText(pageName, locatorname); bool textmatch = SeleniumKeywords.VerifyTextContains(actualtext, expectedtext); string msg = "Element : " + elementname + " , Expected : " + expectedtext + " , Actual : " + actualtext; result.Add(new string[] { msg, textmatch.ToString() }); } return(result); }