Comments (1)
getLogs
is a JSONWireProtocol command which we've deprecated and is probably already not supported anymore in latest browser. To fetch logs from browser I recommend this approach:
await browser.sessionSubscribe({ events: ['log.entryAdded'] })
browser.on('log.entryAdded', (entry) => {
console.log(entry)
})
await browser.execute(() => console.log('Hello, World!'))
This also works in multiremote. Note that calling browser.on
will give you the logs from both browser which makes it hard to differentiate from which browser the log came from. Therefor I recommend if you are interested in the log of a single browser do this:
await browser.sessionSubscribe({ events: ['log.entryAdded'] })
browser.myChrome.on('log.entryAdded', (entry) => {
console.log('myChrome log:', entry)
})
browser.myFirefox.on('log.entryAdded', (entry) => {
console.log('myFirefox log:', entry)
})
await browser.execute(() => console.log('Hello, World!'))
from webdriverio.
Related Issues (20)
- [🐛 Bug]: WebdriverIO toMatchSnapshot does not fail tests on mocha test retries HOT 7
- [🐛 Bug]: `aria/` selector fails when selecting an input related to a label when there are multiple inputs in the document
- [💡 Feature]: Add certificate to Browserstack service config HOT 1
- [💡 Feature]: Modification of outbound network request props HOT 6
- [🐛 Bug]: Cannot add custom `scroll` element command HOT 3
- [🐛 Bug]: Internal TypeError when chaining from an index of a ChainableElementArray HOT 6
- [🐛 Bug]: await browser.acceptAlert() is not working HOT 3
- Allure reports - way to surface the WDIO commands instead of displaying HTTP requests HOT 1
- [🐛 Bug]: Chromedriver binary override no longer works HOT 6
- [💡 Feature]: [spec-reporter] Do not report a failed test as a failure if it passed on a subsequent retry HOT 3
- [🐛 Bug]: App getting stuck after Launch HOT 1
- [🐛 Bug]: `browser.mock` not working locally with Firefox 126 HOT 2
- [🐛 Bug]: ERROR webdriver: Failed downloading chromedriver v125.0.6422.141: Download failed: server returned code 404 HOT 3
- [🐛 Bug]: Spec CLI arg breakable on Windows HOT 6
- [🐛 Bug]: Error installing @wdio/cli during project initialization HOT 2
- [🐛 Bug]: <@wdio/config:ConfigParser: Failed loading configuration file in CircleCi> HOT 1
- [🐛 Bug]: Error: There isn't any active suite! HOT 2
- [🐛 Bug]: Inconsistency with driver.lock HOT 3
- [🐛 Bug]: ts-node performs type check regardless of configuration HOT 1
- [📖 Docs]: <title> Fix mock.restore docs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webdriverio.