@Kashish, normally we use Ctrl+A to perform select all on a webpage. So in selenium webdriver, we can use Keys.chord() method to perform select all this way:
WebElement body = driver.findElement(By.tagName("body"));
body.sendKeys(Keys.chord(Keys.CONTROL,"a"));