title: How to convert webelement to string in selenium using java? Please refers to detail section for more info
body: <p>I created a <code>POM</code> for 'Create project' page</p>
  
  <pre><code>public static class addProjInfo_container
          {
              public static WebElement ProjName_txt(WebDriver driver)
              {
                  element=driver.findElement(By.xpath("//label[text()='Project Name']/following-sibling::input"));
  
                  return element;
              }
  // and so on for every text field for adding project...
  </code></pre>
  
  <p>And I created a <code>TestUtility</code> class with method for <code>waitForElement</code> as show below</p>
  
  <pre><code>public final class TestUtility {
  
      private static WebDriver driver;
  
  
      public static void waitforElementXpath(final WebDriver driver,final int waitTime,final String xp)
      {
          WebDriverWait wait =new WebDriverWait(driver, waitTime);
          wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(xp)));
      }
  }
  </code></pre>
  
  <p>Now, in Test script I want to avoid using <code>Thread.sleep()</code> to wait for webelement to be ready to start performing actions.</p>
  
  <p>so, I use</p>
  
  <pre><code>TestUtility.waitforElementXpath(driver,10,CreateProject_Page.addProjInfo_container.projName_txt(driver));
  </code></pre>
  
  <p>But,it displays error as</p>
  
  <pre><code>The method waitforElementXpath(WebDriver, int, String) in the type TestUtility is not applicable for the arguments (WebDriver, int, WebElement)
  </code></pre>
  
  <p>Kindly, let me know how to handle the issue.</p>