public void ExecuteTest() { WebDriver.driver.Navigate().GoToUrl("http://automationpractice.com/index.php?controller=authentication&back=my-account"); WebDriver.driver.Manage().Window.Maximize(); Console.WriteLine("Opened URL"); LogInPageObject.LogIn("*****@*****.**", "LigaLegendi"); Console.WriteLine("Logged in the page!"); SearchPageObject.EnterProduct("shirt"); Console.WriteLine("Searched page for 'shirt'."); ShoppingPageObjects.SelectProduct(); Console.WriteLine("Going to product page."); ProductPageObjects.AddToCart(); Console.WriteLine("Product bought."); ShoppingCartPageObjects.AddQuantity("2"); Console.WriteLine("Two more shirts added to the cart. "); AddressPageObjects.AddComment("Your page is very good."); Console.WriteLine("Commented the page"); ShippingPageObjects.GoToPayment(); Console.WriteLine("Executed Test!"); }
public void Init() { _driver = new ChromeDriver(); HomePage = new HomePageObjects(_driver); Products = new ProductPageObjects(_driver); HomePage.goToPage(); }