internal void DeleteListing(IWebDriver driver) { //Wait untill driver find Manage listing tab CommomDriver.WaitForVisibility(driver, "LinkText", "Manage Listings", 2); //click on manage list ManageList.Click(); //Wait untill Driver finds Delete button to click CommomDriver.WaitForVisibility(driver, "XPath", "(//i[@class='remove icon'])[1]", 2); //Click on Delete icon Delete.Click(); //Wait untill Driver finds pop up YES or NO button to click CommomDriver.WaitForVisibility(driver, "XPath", "//div[@class='actions']/button[2]", 2); //Click on Yes or No button ClickAuctionButton.Click(); CommomDriver.WaitForVisibility(driver, "ClassName", "ns-box-inner", 2); try { //Assert - Get the pop up text in PopUpMsg Variable. String PopUpMsg = DeletePopUp.Text; //Assert that popUp will open and has not to be null(or Emplty) Assert.NotNull(PopUpMsg); } catch (Exception e) { Console.WriteLine(e.Message); } }
// Detete a Property internal void DeleteProperty() { //Click on Owners tab Owners.Click(); //Click Properties option Properties.Click(); Thread.Sleep(1000); menulink.Click(); Thread.Sleep(1000); //Click on Delete button Delete.Click(); Thread.Sleep(1000); DeleteConfirmbtn.Click(); string delhouse = Global.GlobalDefinition.driver.FindElement(By.XPath("//*[@id='main-content']/section/div[1]/div/div[3]/div/div[1]/div/div/div[2]/div[1]/div[1]/a/h3")).Text; if (File.Exists(delhouse)) { Thread.Sleep(200); Global.Base.test.Log(LogStatus.Fail, "Test Failed, Record has not deleted"); } else { Thread.Sleep(200); Global.Base.test.Log(LogStatus.Pass, "Test Passed, Record has been deleted successfully"); Global.SaveScreenShotClass.SaveScreenshot(Global.GlobalDefinition.driver, "PropertyListDeleted"); } }
public void deleteFavItem() { Delete.Click(); TimeSpan s = new TimeSpan(0, 0, 0, 120); webDriver.Manage().Timeouts().ImplicitlyWait(s); }
public void DeleteServiceList() { // Navigate to page Manage Listing //ManageListing.Click(); Thread.Sleep(2000); // click on delete button Delete.WaitForElementClickable(driver, 60); Delete.Click(); // Switch to Popup button ClickOnYes.WaitForElementClickable(driver, 60); ClickOnYes.Click(); Thread.Sleep(1000); }
internal void Listing() { Commondriver.Wait(10); Delete.Click(); Popup.Click(); }