package mqTest;
网站建设哪家好,找成都创新互联公司!专注于网页设计、网站建设、微信开发、微信小程序、集团企业网站建设等服务项目。为回馈新老客户创新互联还提供了竹溪免费建站欢迎大家使用!
import java.io.File;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
public class testSelenium1 {
public testSelenium1() {
// TODO Auto-generated constructor stub
}
public static void main(String[] args) {
// TODO Auto-generated method stub
//WebDriver driver=new FirefoxDriver();
File file = new File("F:/IEDriverServer.exe");
System.setProperty("webdriver.ie.driver", file.getAbsolutePath());
DesiredCapabilities ieCapabilities = DesiredCapabilities.internetExplorer();
ieCapabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true);
WebDriver driver=new InternetExplorerDriver(ieCapabilities);
driver.get("https://www.baidu.com");
//WebElement loginLink=driver.findElement(By.partialLinkText("登"));
//loginLink.click();
/*页面代码
*
*/
//用id
WebElement baiduTextBox = driver.findElement(By.id("kw"));
baiduTextBox.sendKeys("selenium");
WebElement button=driver.findElement(By.id("su"));
button.click();
}
}
售后响应及时
7×24小时客服热线数据备份
更安全、更高效、更稳定价格公道精准
项目经理精准报价不弄虚作假合作无风险
重合同讲信誉,无效全额退款