import org.openqa.selenium.WebDriver;
import common.StartFireFox;
public class TestBrowser {
public static void main(String[] args) {
// TODO Auto-generated method stub
WebDriver driver = StartFireFox.start();
driver.get("http://www.cnblogs.com/claudia/");
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// 浏览器最大化
driver.manage().window().maximize();
driver.navigate().to("http://www.baidu.com");
// 刷新浏览器
driver.navigate().refresh();
// 浏览器后退
driver.navigate().back();
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// 浏览器前进
driver.navigate().forward();
// 浏览器退出
driver.quit();
}
}