title: org.openqa.selenium.WebDriverException: unknown error:
body: <p>Automating test scenario with multiple data sets using @dataprovider, for e.g if I have three rows of data in my excel sheet the then my test method should run for three times, it's running fine when I automate till a certain point.
  As shown in code below. but if i write script to automate some more features it runs for one time and throws error:</p>
  
  <p>org.openqa.selenium.WebDriverException: unknown error: 
  Element ... is not clickable</p>
  
  <pre><code>package com.modular.framework.Functional_TestSuites;
  
  import java.util.List;
  import org.apache.log4j.Logger;
  import org.openqa.selenium.By;
  import org.openqa.selenium.WebElement;
  import org.openqa.selenium.support.ui.Select;
  import org.testng.annotations.DataProvider;
  import org.testng.annotations.Test;
  import com.modular.framework.Generic_Libraries.CommonFunctions;
  import com.modular.framework.Generic_Libraries.LoggerHelper;
  import com.modular.framework.Generic_Libraries.RetrieveXlsxData;
  import com.modular.framework.InitWebdriver.InitDriver;
  
  public class DemTest {
  
      static Logger log = LoggerHelper.writeLog(ProfileDetailsTest.class);
      static String Parent;
      static String Child;
  
      @DataProvider(name = "dataTest12")
      public static Object[][] validationC() throws Exception {
  
          String[][] testDataArr = RetrieveXlsxData.getTableArray(
                  "E:/MavenProject/WebAutomation_msupply_2/WebAutomation_msupply_2/src/test/resources/First.xls",
                  "Sheet1");
          return testDataArr;
      }
  
      @Test(dataProvider = "dataTest12")
      public void fillingProfile(String enquiryid, String brand, String baseRate, String vat, String deliveryType,
              String creditDays, String data) throws Throwable {
  
          CommonFunctions.LoadPageExpicitWait();
  
  
          Thread.sleep(3000);
          InitDriver.driver.findElement(By.linkText("My Enquiries")).click();
          Thread.sleep(1000);
          InitDriver.driver.findElement(By.linkText("Quote Pending")).click();
  
          new Select(InitDriver.driver.findElement(By.name("viewItemPerPage"))).selectByValue("number:50");
  
          Thread.sleep(2000);
          selectEnquiryId(enquiryid);
  
          Thread.sleep(3000);
  
          log.info("filling the price");
  
          supplierInputs(brand, baseRate, vat, deliveryType, creditDays);
      }
  
      public void selectEnquiryId(String enquiryId) {
  
          List&lt;WebElement&gt; enquiryIds = InitDriver.driver.findElements(By.xpath(
                  "//table[@class='custom-enqtable']/tbody/tr/td//div[contains(text(),'Enquiry Number')]/following-sibling::div"));
  
          List&lt;WebElement&gt; quoteBtns = InitDriver.driver.findElements(
                  By.xpath("//table[@class='custom-enqtable']/tbody/tr/td//a[contains(text(),'Quote Now')]"));
  
          for (int i = 0; i &lt; enquiryIds.size() &amp;&amp; i &lt; quoteBtns.size(); i++) {
  
              if (enquiryIds.get(i).getText().contains(enquiryId)) {
  
                  quoteBtns.get(i).click();
                  break;
              }
          }
  
      }
  
      public void supplierInputs(String data1, String data2, String data3, String data4, String data5) throws Throwable {
  
          log.info("Brand suggested : " + data1);
          log.info("B Rate  : " + data2);
          log.info("VAT  : " + data3);
          log.info("If on credit opted  : " + data4);
          List&lt;WebElement&gt; inputFields = InitDriver.driver
                  .findElements(By.xpath("//tr[@id='addBrandTbl']//tbody//input"));
          log.info("Itdentifying no. of fields");
          log.info("Total input fields :" + inputFields.size());
          for (int i = 0; i &lt; inputFields.size(); i++) {
  
              String ngModel = inputFields.get(i).getAttribute("ng-model");
              log.info(ngModel);
              if (ngModel.contains("product.brand")) {
                  if (inputFields.get(i).getAttribute("class").contains("ng-valid ng-empty")) {
                      inputFields.get(i).sendKeys(data1);
                  }
  
              } else if ((inputFields.get(i).getAttribute("ng-model")).contains("product.getRate")) {
  
                  inputFields.get(i).sendKeys(data2);
  
              } else if ((inputFields.get(i).getAttribute("ng-model")).contains("product.VAT")) {
  
                  inputFields.get(i).sendKeys(data3);
  
              } else if (data4.contains("On Credit")
                      &amp;&amp; (inputFields.get(i).getAttribute("ng-model").contains("temp.paymentMode"))) {
  
                  inputFields.get(i).click();
                  break;
  
              } else if (data4.contains("On Delivery")
                      &amp;&amp; (inputFields.get(i).getAttribute("value").contains("onDelivery"))) {
  
                  inputFields.get(i).click();
                  break;
              }
          }
  
          InitDriver.driver
                  .findElement(By.xpath(".//*[@id='addBrandTbl']/td/table/tbody/tr[2]/td/div/div[2]/label[1]/input[2]"))
                  .sendKeys(data5);
  
          InitDriver.driver.findElement(By.xpath("html/body/div[3]/ng-view/div[3]/div/div[4]/div[1]/span[1]/img"))
                  .click();
          InitDriver.driver.findElement(By.xpath("html/body/div[4]/div[1]/table/tbody/tr[5]/td[4]")).click();
          new Select(InitDriver.driver
                  .findElement(By.xpath("html/body/div[3]/ng-view/div[3]/div/div[4]/div[1]/span[2]/select")))
                          .selectByIndex(1);
  
          InitDriver.driver.findElement(By.id("deliverytime1")).sendKeys("79");
          new Select(InitDriver.driver
                  .findElement(By.xpath("html/body/div[3]/ng-view/div[3]/div/div[4]/div[2]/span/select")))
                          .selectByIndex(1);
  
          new Select(InitDriver.driver
                  .findElement(By.xpath("html/body/div[3]/ng-view/div[3]/div/div[4]/div[3]/span/select")))
                          .selectByIndex(1);
  
          new Select(InitDriver.driver
                  .findElement(By.xpath("html/body/div[3]/ng-view/div[3]/div/div[4]/div[4]/span/select")))
                          .selectByIndex(1);
  </code></pre>
  
  <p>it's running fine till here but after this, if i include below code its run for one time. i.e running once,@dataprovider is returning all data in three rows.</p>
  
  <p>//InitDriver.driver.navigate().back();: this i did to make run</p>
  
  <pre><code>    /*
       * InitDriver.driver.findElement(By.xpath(
       * "html/body/div[3]/ng-view/div[3]/div/div[6]/textarea")).
       * sendKeys("Fill the text area");
       * 
       * InitDriver.driver.findElement(By.xpath(
       * "html/body/div[3]/ng-view/div[3]/div/div[8]/div[1]/div/label")).click
       * ();
       */
  </code></pre>