???????Selenium????Webdriver????????????????
???????????? ???????[ 2015/2/26 15:11:10 ] ????????Selenium ??????????
??????????? Selenium ???????
????Selenium API ????????????????????????????? Java ?????
????
? 1. Selenium ???????
???åµ¥ 1. ??? Selenium API ???? - ??? SmartCloud iNotes
package demo;
import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.Selenium;
public class SeleniumDemo {
public static void main(String[] args) throws InterruptedException {
// ??????? Selenium ???
Selenium selenium = new DefaultSelenium("localhost"?? 4444??
"*firefox"?? "https://apps.na.collabserv.com/");
// ??? selenium session
selenium.start();
// ?????????
selenium.open("https://apps.lotuslive.com/");
// ???????????????
selenium.type("//input[@id='username']"??
"autouser01@e3yunmail.mail.lotuslive.com");
selenium.type("//input[@id='password']"?? "test");
// ???
selenium.click("//input[@id='submit_form']");
// ???????????? Mail ????
int count = 60;
while(count > 0){
if(selenium.isElementPresent("//a[contains(text()??'Mail')]")){
break;
}else{
Thread.sleep(1000);
count--;
}
}
// ???
selenium.click("//a[contains(text()??'Log Out')]");
// ???????????? selenium session
selenium.stop();
}
}
??????
???·???
??????????????????
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