???set??get????????????????
???????????? ???????[ 2013/10/9 11:32:12 ] ????????
??????????????set??get??????????з????????????????????????????????????н??д???
?????????????????
import java.io.File;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;
/*
*?????????set??get??????????????????????set??????get????
*/
public class LoginCenter {
//?????????????????
private FirefoxProfile profile = new FirefoxProfile(new File("C:\Users\qinfei\AppData\Roaming\Mozilla\Firefox\Profiles\sdk"));
private WebDriver driver=new FirefoxDriver(profile);
private String baseUrl;
//?????????????????????????????????ó?????
public void setWebDriver(WebDriver dri){
if(dri!=null){
driver=dri;
}
}
// ??????????????
public WebDriver getWebDriver(){
return driver;
}
//???????url????????????????
public void setbaseUrl(String url){
if(url!=null){
baseUrl=url;
}
}
//???????????
public String getbaseUrl(){
return baseUrl;
}
}
|
??????????????????LoginCenter???е????
import org.openqa.selenium.WebDriver;
public class Test101 {
public static void main(String[] args){
WebDriver dri=null;
String url;
//???÷??????????????????
LoginCenter lo=new LoginCenter();
//????LoginCenter???е?setbaseUrl????????????
lo.setbaseUrl("http://www.baidu.com");
//????????????
url=lo.getbaseUrl();
//??????е???LoginCenter???е?setWebDriver???????????????????????
dri=lo.getWebDriver();
//?????Test101??
Test101 t1=new Test101();
//????Test101???е?test???????????????????????????????
t1.test(dri?? url);
}
public void test(WebDriver dri??String url){
//???get??????????????????
dri.get(url);
}
}
|
??????java application????????У??????
?????????е?Ч?????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
????????Щ?????????????????????????????ν??????Щ???????????????????????С???????????????????????????????????????????????????Щ???棿?????????????????????????????????????Щ????????????????????裿????????蹤??????????????????????????????????????????蹤?????????θ?Ч??????д?????飿???д?????????????????????????δ??????????????????????????蹤??????????????????飺?????????????????????????????????????????蹤??????Щ??????????????????????????????????????????????????????????????????????????????????????д?????飿??д??????????????????????蹤??CodeAnalyzer????????????????????????ú?????????鶴??
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????