public void TestTitle() { Assert.IsTrue(GCDriver.Title.Equals("Improving Literacy Briefs | National Center on Improving Literacy")); Assert.IsTrue(TestingClass.TextCheckMethodCSS("Improving Literacy Briefs", ".page__title", GCDriver)); Assert.IsTrue(TestingClass.TextCheckMethodClassName("Read research summaries and infographics written by our experts that simplify complex ideas related to literacy.", "lead", GCDriver)); TestingClass.IsElementPresentCSS(".container.header-icon", GCDriver); }
public void KidZoneBoxTest() { Console.WriteLine("4 KidZone Box Test"); GCDriver.FindElement(By.CssSelector(".lead.margin-bottom")).Text.CompareTo(" The Literacy Playground for Kids & Families!"); Assert.IsTrue(TestingClass.TextCheckMethodClassName("LISTEN", "lime-text", GCDriver)); Assert.IsTrue(TestingClass.TextCheckMethodClassName("READ", "pink-text", GCDriver)); Assert.IsTrue(TestingClass.TextCheckMethodClassName("PLAY", "light-teal-text", GCDriver)); Console.WriteLine("4 KidZone Box Test COMPLETE"); }
public void TestHeader() { //header title Assert.IsTrue(TestingClass.TextCheckMethodClassName("You are here\r\nHome\r\nState Agencies\r\nDevelop and implement state and local structures, procedures and policies to address student challenges in learning to read and write.", "col-sm-8", GCDriver)); //header description Assert.IsTrue(TestingClass.TextCheckMethodCSS("Develop and implement state and local structures, procedures and policies to address student challenges in learning to read and write.", ".block.block-block.first.last.odd", GCDriver)); //Assert.IsTrue(GCDriver.FindElement(By.CssSelector(".container.header-icon")).Displayed; TestingClass.IsElementPresentCSS(".container.header-icon", GCDriver); }
public void TestTagLineText() { Console.WriteLine("1 Testing Tagline Text"); //GCDriver.FindElement(By.ClassName("tagline")).Text.CompareTo("Your source for improving outcomes for students with " + // "literacy-related disabilities, including dyslexia."); Assert.IsTrue(TestingClass.TextCheckMethodClassName("Your source for improving outcomes for students with " + "literacy-related disabilities, including dyslexia.", "tagline", GCDriver)); Assert.IsTrue(TestingClass.TextCheckMethodXPath("A Path to Success", "//*[@id='start']/div/div[1]/div/h2", GCDriver)); //GCDriver.FindElement(By.XPath("//*[@id='start']/div/div[1]/div/h2")).Text.CompareTo("A Path to Success"); Console.WriteLine("1 Testing Tagline Text complete"); }
public void TestFooterText() { Console.WriteLine("7 Footer text test"); Assert.IsTrue(TestingClass.TextCheckMethodCSS("Contact Us\r\nEmail Us\r\nFollow us on Facebook\r\nFollow us on Twitter\r\nSubscribe to our YouTube Feed\r\nShare\r\nShare on Facebook\r\n Share on Twitter", ".footer-col.col-md-4", GCDriver)); Assert.IsTrue(TestingClass.TextCheckMethodCSS("Stay Informed!\r\nEmail *", ".block-constant-contact.first.last.odd", GCDriver)); Assert.IsTrue(TestingClass.TextCheckMethodClassName("The research reported here is funded by awards to the National Center on Improving Literacy from the Office of Elementary " + "and Secondary Education, in partnership with the Office of Special Education Programs (Award #: S283D160003). The opinions expressed are those of the authors" + " and do not represent views of OESE, OSEP, or the U.S. Department of Education.", "margin-top", GCDriver)); Assert.IsTrue(TestingClass.TextCheckMethodClassName("Copyright © 2018 National Center on Improving Literacy Terms and Conditions | Privacy Policy | Accessibility", "footer-below", GCDriver)); Console.WriteLine("7 footer text test COMPLETE"); }