Edit Lead
~30 mins
Edit Lead
package testcase;
import java.io.IOException;
import java.time.Duration;
import org.openqa.selenium.By;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import io.github.bonigarcia.wdm.WebDriverManager;
public class EditLead extends BaseClass {
@BeforeTest
public void setFileName() {
excelFileName ="EditLead";
}
@Test(dataProvider="sendData")
public void editLead(String company, String phNo) throws InterruptedException {
driver.findElement(By.linkText("Find Leads")).click();
driver.findElement(By.xpath("//span[text()='Phone']")).click();
driver.findElement(By.xpath("//input[@name='phoneNumber']")).sendKeys(phNo);
driver.findElement(By.xpath("//button[text()='Find Leads']")).click();
Thread.sleep(2000);
driver.findElement(By.xpath("//div[@class='x-grid3-cell-inner x-grid3-col-partyId']/a")).click();
driver.findElement(By.linkText("Edit")).click();
driver.findElement(By.id("updateLeadForm_companyName")).sendKeys(company);
driver.findElement(By.name("submitButton")).click();
}
}