51Testing软件测试论坛

标题: 新人求助-IE11 - 找不到控件 [打印本页]

作者: Pippen_Liu    时间: 2015-1-25 22:07
标题: 新人求助-IE11 - 找不到控件
在dotnet下创建了一个控制台程序,如下
            InternetExplorerOptions ieO = new InternetExplorerOptions();
            //设置ingnore protected mode值为真
            ieO.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
            IWebDriver driver = new InternetExplorerDriver(@"C:\Program Files\Internet Explorer", ieO);

            driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(10));
            driver.Navigate().GoToUrl("http://www.baidu.com");

           IWebElement kw = driver.FindElement(By.Id("kw"));

ie能打开,并且baidu也打开了,但是id却找不到。
Unable to find element with id == kw
作者: 土土的豆豆    时间: 2015-1-26 12:18
去除IE 11的安全保护模式试试看呢? 即protected mode
作者: datongzhi    时间: 2015-7-2 14:44
不支持IE11




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2