title: How do i make to wait for ajax which looks for jquery status active?
body: <p>I want to wait until ajax gets successfully loads and jquery becomes active.
  How could it make as a reusable function in among the methods?
  I'm a newbie to selenium. Your help will make me understand the concept well.</p>
  
  <pre><code>List&lt;WebElement&gt; shipmentList = noOfShipment.findElements(By.tagName("tr")); 
  int shipmentCount = shipmentList.size(); 
  for (int row=1;row&lt;shipmentCount;row=+1) { 
      try{ 
          WebElement onOfSkuWE= driver.findElement(By.xpath(".//*[@id='fba-core-workflow-shi‌pment-summary-shipme‌​nt']/tr["+row+"]/td[‌​3]")); 
          String noOfSku = onOfSkuWE.getText(); 
          int noOfSkuValue = Integer.parseInt(noOfSku); 
          if(mskuType.equalsIgnoreCase("single")) { 
              if(noOfSku.equalsIgnoreCase("1")) { 
                  driver.findElement(By.xpath("..//button["+row+"][@name='‌​Work on shipment']")).click(); 
                  break; 
              } 
          }
      }
  }
  </code></pre>
  
  <p>Thanks </p>