Example #1
0
 public void DeleteLead(String LeadFirstname, String LeadLastname) {
   new Leadlib().ModifyLead(LeadFirstname, LeadLastname);
   wclib.waitForPageToLoad();
   com.getMorebtn().click();
   lead.getLeadDeleteLink().click();
   com.getConfirmationpopup().click();
   wclib.waitForElemnetXpathPresent("//div[@class='listViewEntriesDiv contents-bottomscroll']");
 }
Example #2
0
 public void DuplicateLead(String LeadLastName) {
   new Leadlib().CreateLead(LeadLastName);
   wclib.waitForPageToLoad();
   com.getMorebtn().click();
   lead.getLeadDuplicateLink().click();
   wclib.waitForPageToLoad();
   com.getSavebtn().click();
   wclib.waitForPageToLoad();
   lead.getLeadListLink().click();
   wclib.waitForPageToLoad();
   List<WebElement> lst =
       wclib.GetBulkWebElementusingxpath(
           "//table[@class='table table-bordered listViewEntriesTable']/tbody/tr/td[3]");
   int count = 0;
   for (int i = 1; i < lst.size(); i++) {
     String duplicatename = ((WebElement) lst.get(i)).getText();
     if (LeadLastName.equals(duplicatename)) {
       count++;
     } else {
       System.out.println("Duplicate Leads is not created");
     }
   }
   System.out.println(count + " " + "duplicate Leads is created");
 }