Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
docs(faq): add link to webdriverjs-retry and question about catching …
Browse files Browse the repository at this point in the history
…errors
  • Loading branch information
juliemr committed Apr 4, 2014
1 parent b81cf5a commit ec7ca89
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,10 @@ How do I produce an XML report of my test results?
--------------------------------------------------

Use jasmine-reporters and add a JUnit XML Reporter. Check out [this example](https://github.com/angular/protractor/blob/master/spec/junitOutputConf.js).

How can I catch errors such as ElementNotFound?
-----------------------------------------------
WebDriver throws errors when commands cannot be completed - e.g. not being able to click on an element which is obscured by another element. If you need to retry these actions, try using [webdriverjs-retry](https://github.com/juliemr/webdriverjs-retry). If you would just like to catch the error, do so like this
```javascript
elm.click().then(function() { /* passing case */}, function(err) { /* error handling here */})
```

0 comments on commit ec7ca89

Please sign in to comment.