WebElement element = driver.findElement(By.linkText ("home")); WebElement element = driver.findElement(By.linkText ("courses"));