selenium.Click("link=Images"); // Identify link by using label
selenium.WaitForPageToLoad("30000"); // wait for page to load
Assert.AreEqual("Google Images", selenium.GetTitle());
selenium.Click("css=#gb_8 > span.gbts"); //Identifying by using css selector
selenium.WaitForPageToLoad("30000");
Assert.AreEqual("Google Maps", selenium.GetTitle()); // Verifying by using page title
selenium.Click("link=News");
selenium.WaitForPageToLoad("30000");
Assert.AreEqual("Google",selenium.GetTitle());
selenium.Click("xpath=//div[@id='als']//font[@id='addlang']/a[2]"); // Using XPath
No comments:
Post a Comment