public void HomePageActionWithAdditem() { screenshot screens = new screenshot(); //this fuction is not working yet //WebDriverWait wait = new WebDriverWait(CommonDriver.driver, new TimeSpan(0, 0, 10)); //wait.Until(ExpectedConditions.ElementIsVisible(By.XPath("//div[@id='shopping_cart_container']"))); //SelectElement Oselection = new SelectElement(SelectButton); //Oselection.SelectByText("Name (Z to A)"); BackPackImg.Click(); screens.Takescreenshot2("filename"); screens.Takescreenshot9("filename"); ImgBackButton.Click(); screens.Takescreenshot2("filename"); screens.Takescreenshot9("filename"); ImgADDTOCARTButton.Click(); screens.Takescreenshot2("filename"); screens.Takescreenshot9("filename"); CartImg.Click(); Console.WriteLine("The item that the customer chose is " + ItemName.Text); screens.Takescreenshot2("filename"); screens.Takescreenshot9("filename"); }
public void ParameterisedLoginData(string username, string password) { screenshot screens = new screenshot(); Username.SendKeys(username); Console.WriteLine("The name of the customer is " + username); Password.SendKeys(password); Console.WriteLine("the password is " + password); screens.Takescreenshot("filename"); screens.Takescreenshot2("filename"); screens.Takescreenshot4("filename"); screens.Takescreenshot9("filename"); Login.Click(); WebDriverWait wait = new WebDriverWait(CommonDriver.driver, TimeSpan.FromSeconds(10)); }