I want to capture a screenshot only upon unexpected exception.
相关问题
- Dependencies while implementing Mocking in Junit4
- Selenium in Java is not finding element when using
- How to send text to the search field through Selen
- What is the difference in “find_element_by_xpath”
- org.apache.commons.fileupload.disk.DiskFileItem is
相关文章
- Setup and Tear Down of Complex Database State With
- driver.Manage().Logs.GetLog(LogType.Browser) no lo
- JUnit continue to assert things after expected exc
- Do errors thrown within UncaughtExceptionHandler g
- nested try/except in Python
- How to specify @category in test task in gradle?
- Chrome: fake microphone input for test purpose
- Speeding up Selenium Webdriver
Note.- This answer could be outdated. The answer is based on Selenium 2.15
Using TestWatcher does the trick (the unit test must extend following
BaseTest
):Note
Utils.getFirefoxDriver()
returns a customizedWebDriver
. Something like: