//经过彻底匹配连接来定位
driver.findElement(By.linkText("新闻")).click();
//经过部分匹配连接来定位
driver.findElement(By.partialLinkText("新")).click();
//经过xpath方式进行定位
driver.findElement(By.xpath(".//*[@id='kw']")).sendKeys("selenium");
//经过css方式进行定位
driver.findElement(By.cssSelector("#kw")).sendKeys("时光");