Exception NoSuchElementException
Solutions
1. Check the locator of your target element.
2. If the locator is current. Try to wait for page load before find element.
3. If already wait for long time and always cannot find the element, try to use another type locator.
Exception NoSuchWindowException
Solutions
1.Check the window’s locator.
2.Wait page load before find the window.
Exception NoAlertPresentException
Solutions
1.Make sure the alert( javascript pop window not new window) will present.
2.Wait page load before deal the alert.
Exception NoSuchFrameException
Solutions
1.Check the frame’s locator.
2.Check is the frame has some father frame.(if has father frame you should switch to the father frame first)
3.Make sure switch to the default content before switch to target frame( only for single frame)
4.Wait page load before switch to frame.
Exception UnhandledAlertException
Solutions
1. Check if there is some alert dialog present. ( JavaScript pop window). And deal with them.
2. If no javascript pop window present but the exception still occurs. Make sure the developer tools is closed when running automation case. (Because since selenium 2.19. “UnhandledAlertException” added and they think the developer tool is an alert)
Exception UnexpectedTagNameException
Solutions
1.Check the target element’s html tag name.
2.Try to wait for page load then initializing the selector.
Exception StaleElementReferenceException
Solutions
1.Re-find the element again. (Because the element has been refresh.)
Exception TimeoutException
Solutions
1. Check the expected conditions locator.
2..Increase the wait time.
分享到:
相关推荐
selenium webdriver2 环境搭建
selenium RC与selenium webdriver的区别
全书共分为四个部分:第1部分基础篇主要讲解自动化测试相关的基础理论、WebDriver 环境安装、单元测试工具的使用方法以及 WebDrvier的入门使用实例,第2部分实战应用篇基于丰富的实战案例讲解页面元素的定位方法以及...
selenium-webdriver原创selenium-webdriver原创selenium-webdriver原创selenium-webdriver原创
关于Selenium WebDriver工作原理的介绍,原理相关描述
selenium2 webdriver的介绍 selenium2 webdriver的配置安装 selenium2 webdriver的基本操作 selenium2 webdriver使用技巧 ……
python 自动化测试框架;selenium webdriver python 第三版本
Selenium WebDriver 3.14.0 本来需要.net45 我改为.net2.0 希望喜欢的人需要。 dll 反编译,嵌入程序内。无需调用那个讨厌的dll。 绝对不骗人,骗人是小狗。架构复杂修改麻烦,各位体谅
Selenium WebDriver详解及事例
直入主题,由于开源社区不再维护selenium 1.x再加之更为先进的selenium 2.0确实有不少优势之初可以完全取代1.x,在这里笔者会花一些笔墨,若干篇幅,争取深入浅出的讲解selenium 2.0的一些基本知识,常用方法和高级...
selenium-webdriver-2.5.0.gem
Selenium WebDriver 学习笔记 API大全 中文API 元素 操作大全
Selenium WebDriver Practical Guide will guide you through the various APIs of WebDriver which should be used in automation tests, followed by a discussion of the various WebDriver implementations ...
selenium webdriver2 一个完整demo
Selenium WebDriver Recipes in C#(2nd) 英文epub 第2版 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
selenium webdriver是web自动化的一本经典著作,吴老集合python java不同版本。本资源为java版本,内容较新,无论是入门还是提升都有很大帮助。
web自动化测试selenium+webdriver安装及环境详细配置
Selenium 客户端和 WebDriver 语言绑定(Selenium Clients and WebDriver Language Bindings)适用于C#语言 为了创建与 Selenium Server (Remote WebDriver) 交互的脚本或创建本地 Selenium WebDriver 脚本,您需要...
selenium WebDriver 安装包及启动服务的一些命令 对于正在学习自动化测试的小伙伴们非常有用
Selenium WebDriver 3 Practical Guide will walk you through the various APIs of Selenium WebDriver, which are used in automation tests, followed by a discussion of the various WebDriver implementations...