title: Select Text Using DoubleClick from WebDriver Java
body: <p>I want to do double click on search inputbox of google page and it should be selected </p>
  
  <p>This is my code :</p>
  
  <pre><code>    WebDriver driver = new FirefoxDriver();
      driver.navigate().to("http://www.google.com");
      WebElement oWE = driver.findElement(By.name("q"));
      WebDriverWait wait = new WebDriverWait(driver, 30);
      wait.until(ExpectedConditions.presenceOfElementLocated(By.name("q")));
      if (oWE.isDisplayed()) {
         System.out.println("Displayed");
         oWE.sendKeys("abcd");
         driver.findElement(By.id("gbqfb")).click();
         Actions oAction = new Actions(driver);
         oAction.moveToElement(oWE);
         oAction.doubleClick(oWE).build().perform();
      }
  </code></pre>
  
  <p>but text is not selected. </p>
  
  <p>1.Why it is not working?</p>
  
  <p>2.We always use By.ID,By.name etc why we do not use ById.Id ByName.name etc
  if we can use this where it should be used if not why we did not use this?</p>