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

Commit 423c1a7

Browse files
committed
docs(faq): add a note about getting browser logs from your test
1 parent 06d8f6f commit 423c1a7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: docs/faq.md

+9
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,15 @@ You can also execute arbitrary JavaScript in the browser with
8080
browser.executeScript('your script as a string')
8181
```
8282

83+
How can I get hold of the browser's console?
84+
--------------------------------------------
85+
In your test:
86+
```javascript
87+
browser.manage().logs().get('browser').then(function(browserLog) {
88+
console.log('log: ' + require('util').inspect(browserLog));
89+
});
90+
```
91+
8392
How do I produce an XML report of my test results?
8493
--------------------------------------------------
8594

0 commit comments

Comments
 (0)