Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- using OpenQA.Selenium;
- using OpenQA.Selenium.PhantomJS;
- [TestClass]
- public class UnitTest1
- {
- const string PhantomDirectory = @"......packagesPhantomJS.2.1.1toolsphantomjs";
- [TestMethod]
- public void GetSproutsWeeklyAdDetails()
- {
- using (IWebDriver phantomDriver = new PhantomJSDriver(PhantomDirectory))
- {
- phantomDriver.Navigate().GoToUrl("https://shop.sprouts.com/shop/flyer");
- var elements = phantomDriver.FindElements(By.ClassName("cell-title-text"));
- }
- }
- }
Add Comment
Please, Sign In to add comment