Selenium+webDriver+win10 启动IE11 浏览器报错“org.openqa.selenium.NoSuchWindowException
来源:互联网 发布:linux统计文件夹数量 编辑:程序博客网 时间:2024/05/21 08:55
Selenium2+webDriver 启动IE11报错
错误信息:org.openqa.selenium.NoSuchElementException: Unable to find element with id == u1 (WARNING: The server did not provide any stacktrace information)源码: WebDriver driver; String url = "http://www.baidu.com/"; System.setProperty("webdriver.ie.driver", "D:\\IEDriverServer_x64_2.53.1.exe"); driver = new InternetExplorerDriver(); driver.get(url); //打开浏览器 WebElement u = driver.findElement(By.id("u1")); List<WebElement> links = u.findElements(By.tagName("a")); WebElement l = links.get(8); WebElement link = l.findElement(By.linkText("更多产品")); Actions action = new Actions(driver); action.moveToElement(link).perform();解决方案: WebDriver driver; String url = "http://www.baidu.com/"; System.setProperty("webdriver.ie.driver", "D:\\IEDriverServer_x64_2.53.1.exe"); DesiredCapabilities ieCaps = DesiredCapabilities.internetExplorer(); ieCaps.setCapability(InternetExplorerDriver.INITIAL_BROWSER_URL, url); driver = new InternetExplorerDriver(ieCaps); WebElement u = driver.findElement(By.id("u1")); List<WebElement> links = u.findElements(By.tagName("a")); WebElement l = links.get(8); Actions action = new Actions(driver); action.moveToElement(l).perform();
阅读全文
1 0
- Selenium+webDriver+win10 启动IE11 浏览器报错“org.openqa.selenium.NoSuchWindowException
- Selenium+webDriver 启动IE11 浏览器报错“org.openqa.selenium.NoSuchWindowException”
- Appium 报错:org.openqa.selenium.NoSuchWindowException: no such window: target window already closed
- Appium报错:org.openqa.selenium.NoSuchSessionException
- 用java+selenium启动chrome浏览器时报错Exception in thread "main" org.openqa.selenium.NoSuchSession
- Selenium WebDriver启动FireFox浏览器报错org/w3c/dom/ElementTraversal的解决方案
- webdriver selenium org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with
- webdriver selenium org.openqa.selenium.remote.UnreachableBrowserException: Error
- TestSuite很多skipped,报错Exception org.openqa.selenium.SessionNotCreatedException
- xpath定位报错org.openqa.selenium.NoSuchElementException:
- selenium IE11自动化打开浏览器报错
- org.openqa.selenium.StaleElementReferenceException
- org.openqa.selenium.StaleElementReferenceException
- org.openqa.selenium.ElementNotVisibleException
- org/openqa/selenium/WebDriver : Unsupported major.minor version 52.0
- 解决selenium webdriver运行出现的org.openqa.selenium.firefox.NotConnectedException问题
- selenium异常:org.openqa.selenium.remote.UnreachableBrowserException
- selenium调用IE11浏览器,报错“找不到元素”
- JAVA基础知识
- VIM基本操作,掌握这些就够了
- iOS设置translucent引发的导航栏色差和坐标问题
- 关于cell点击展开收缩的总结
- 图片缓存之内存缓存技术LruCache,软引用
- Selenium+webDriver+win10 启动IE11 浏览器报错“org.openqa.selenium.NoSuchWindowException
- nfs
- 分享一个上传图片,图片压缩Unsupported Image Type解决方案
- Druid0.10伪分布式部署
- window批处理脚本学习使用:.bat .cmd文件编写
- 小M开发_java零基础
- Selenuim:Eclipse中打开Firefox出错:org.openqa.selenium.firefox.NotConnectedException
- MVC JavaScript() 实现后端执行/调用JS脚本
- Spring中的AOP(五)——在Advice方法中获取目标方法的参数