package ccwp.info.shiyan;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebDriver.Navigation;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
public class test1001 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.setProperty("webdriver.chrome.driver","files/chromedriver.exe");
//System.setProperty("webdriver.chrome.driver","E:\\GoogleChrome39/GoogleChrome39/GoogleChromePortable.exe");
WebDriver driver =new ChromeDriver();
// JavascriptExecutor jse=(JavascriptExecutor) driver1;
Navigation navigation1=driver.navigate();
navigation1.to("http://ccwp.sit.sf-express.com/service/setLogin?openId=BCED0272E8303D139EE9879BDAA56B72&phone=13692212840&channel=3");
try{Thread.sleep(4000);
}catch(InterruptedException e){e.printStackTrace();}
navigation1.to("http://ccwp.sit.sf-express.com/page/tencent/index.html");
WebElement jijian=driver.findElement(By.xpath("//*[@id='wrapper']/section[1]/ul/li[2]/a/h3"));
jijian.click();
try{Thread.sleep(4000);
}catch(InterruptedException e){e.printStackTrace();}
for(int i=1;i<=100;i++) ///i<=100 就代表刷新100次
{ driver.navigate().refresh();
try{Thread.sleep(1000);
}catch(InterruptedException e){e.printStackTrace();}
}
}
}
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebDriver.Navigation;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
public class test1001 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.setProperty("webdriver.chrome.driver","files/chromedriver.exe");
//System.setProperty("webdriver.chrome.driver","E:\\GoogleChrome39/GoogleChrome39/GoogleChromePortable.exe");
WebDriver driver =new ChromeDriver();
// JavascriptExecutor jse=(JavascriptExecutor) driver1;
Navigation navigation1=driver.navigate();
navigation1.to("http://ccwp.sit.sf-express.com/service/setLogin?openId=BCED0272E8303D139EE9879BDAA56B72&phone=13692212840&channel=3");
try{Thread.sleep(4000);
}catch(InterruptedException e){e.printStackTrace();}
navigation1.to("http://ccwp.sit.sf-express.com/page/tencent/index.html");
WebElement jijian=driver.findElement(By.xpath("//*[@id='wrapper']/section[1]/ul/li[2]/a/h3"));
jijian.click();
try{Thread.sleep(4000);
}catch(InterruptedException e){e.printStackTrace();}
for(int i=1;i<=100;i++) ///i<=100 就代表刷新100次
{ driver.navigate().refresh();
try{Thread.sleep(1000);
}catch(InterruptedException e){e.printStackTrace();}
}
}
}