I kept trying to to fulfil text box using selenium but always cannot find that text box after clicking on button to add new customer , it always shows a blank white page. I tried it through chrome and firefox @Test public void AddContact() throws InterruptedException {
WebElement contacts = driver.findElement(By.xpath("//span[text()='Contacts']"));
contacts.click();
WebElement newContact = driver.findElement(By.xpath("/html/body/div[1]/div/div[2]/div[2]/div/div[1]/div[2]/div/a/button"));
Actions action = new Actions(driver);
action.moveToElement(newContact).build().perform();
newContact.click();
WebDriverWait wait = new WebDriverWait(driver, 30);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("/html/body/div/div/div[2]/div[2]/div/div[2]/form/div[1]/div[1]/div/div/input")));
WebElement firstName = driver.findElement(By.xpath("/html/body/div/div/div[2]/div[2]/div/div[2]/form/div[1]/div[1]/div/div/input"));
Aucun commentaire:
Enregistrer un commentaire