日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

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

HTML

浏览器__IE

發布時間:2025/3/15 HTML 12 豆豆
生活随笔 收集整理的這篇文章主要介紹了 浏览器__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的全部內容,希望文章能夠幫你解決所遇到的問題。

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