日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 前端技术 > HTML >内容正文

HTML

浏览器__IE

發布時間:2025/3/15 HTML 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 浏览器__IE 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

一、代碼如下

package www.gui.liulanqi;import java.io.IOException; import java.util.concurrent.TimeUnit;import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.ie.InternetExplorerDriver; import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.remote.DesiredCapabilities;public class Ie {WebDriver driver= null;Actions actions= null;public static void main(String[] args) {// TODO Auto-generated method stubIe gd= new Ie();gd.init();//gd.killDo();//gd.tableProcess();}private void init() {//System.setProperty("webdriver.ie.bin", "C:\\Program Files\\Internet Explorer\\iexplore.exe");//C:\Program Files\Internet Explorer\iexplore.exeSystem.setProperty("webdriver.ie.driver", "d:\\IEDriverServer.exe");//C:\Documents and Settings\Administrator\Local Settings\Application Data\Google\Chrome//C:\Documents and Settings\Administrator\Local Settings\Application Data\Google\Chrome//C:\Program Files (x86)\Google\Chrome\Application\chrome.exe//this.driver = new FirefoxDriver();// 啟動火狐瀏覽器 // DesiredCapabilities dc= DesiredCapabilities.internetExplorer(); // dc.setCapability("ignoreProtectedModeSettings", true); // this.driver= new InternetExplorerDriver(dc);this.driver= new InternetExplorerDriver();this.driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);// 元素等待時間this.driver.manage().timeouts().pageLoadTimeout(30, TimeUnit.SECONDS);// 頁面加載時間this.driver.manage().timeouts().setScriptTimeout(30, TimeUnit.SECONDS);// ajax請求this.driver.manage().window().maximize();// this.driver.get("https://www.baidu.com/");// 在瀏覽器中打開該網址this.driver.get("http://localhost/Agileone/"); // this.driver.findElement(By.id("username")).sendKeys("admin"); // this.driver.findElement(By.id("password")).sendKeys("admin"); // this.driver.findElement(By.id("login")).click(); // // this.driver.findElement(By.partialLinkText("需求提案")).click();}}

?

轉載于:https://www.cnblogs.com/wujianbo123/p/7710902.html

總結

以上是生活随笔為你收集整理的浏览器__IE的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。