首页 > Web开发 > 详细

访问某网页地址

时间:2016-08-07 15:12:48      阅读:234      评论:0      收藏:0      [点我收藏+]

被测试网页地址:http://sogou.com

 1 public class visitURL {
 2 
 3     public WebDriver driver;
 4     @BeforeClass
 5     public void before() throws Exception{
 6         System.setProperty("webdriver.chrome.driver", "F:\\chromedriver.exe");
 7         driver=new ChromeDriver();
 8     }
 9     
10     @Test(priority=0)
11     public void visit_URL() throws Exception{
12         
13         String baseURL="http://www.sogou.com";
14         driver.get(baseURL);
15                 
16     }
17     
18     @Test(priority=1)
19     public void visit2_URL() throws Exception{
20         
21         String baseURL="http://www.sogou.com";
22         driver.navigate().to(baseURL);
23     }
24     @AfterClass
25     public void after() throws Exception{
26         driver.quit();
27     }
28 }
29  

 

访问某网页地址

原文:http://www.cnblogs.com/hao-ye/p/5746024.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!