![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
package for implementing [webdriver BIDI](https://w3c.github.io/webdriver-bidi/). The alpha-4 has basic class to create, subscribe and listen to events. Currently, the development of this package is ongoing and the next release will include a simple API
package for implementing webdriver BIDI. The alpha-4 has basic class to create, subscribe and listen to events. Currently, the development of this package is ongoing and the next release will include a simple API for subscribing to and listening to multiple events. This will make it easier for developers to interact with the WebDriver BIDI protocol and handle multiple events within their applications.
npm i wd-bidi@latest
Here is the sample code on implementation. Get complete code from github.
require('chromedriver');
const {Builder} = require('selenium-webdriver');
const Chrome= require('selenium-webdriver/chrome');
const opts = new Chrome.Options();
const {BiDi, BrowsingContext } = require('wd-bidi');
describe('BrowserContext: Create and listen to event', ()=> {
let driver;
before(async ()=> {
driver = await new Builder()
.forBrowser('chrome')
.setChromeOptions(opts.set('webSocketUrl', true))
.build();
})
it('should listen browserContext events', async () => {
const caps = await driver.getCapabilities();
let WebSocketUrl = caps['map_'].get('webSocketUrl')
const conn = new BiDi(WebSocketUrl.replace('localhost', '127.0.0.1'));
// Subscribe to events
const browsingContext = new BrowsingContext(conn);
await browsingContext.events.contextCreated();
// create a tab
await browsingContext.create({type: 'tab'})
// print the subscription result
console.log(await browsingContext.events.eventSubscriptionData)
})
after(async ()=> await driver.quit())
})
require('chromedriver');
const {Builder} = require('selenium-webdriver');
const Chrome= require('selenium-webdriver/chrome');
const opts = new Chrome.Options();
const { Session, BiDi, Log} = require('wd-bidi');
describe('Session: Log entry added', ()=> {
let driver;
before(async ()=> {
driver = await new Builder()
.forBrowser('chrome')
.setChromeOptions(opts.set('webSocketUrl', true))
.build();
})
it('should listen to log events', async () => {
const caps = await driver.getCapabilities();
let WebSocketUrl = caps['map_'].get('webSocketUrl')
const conn = new BiDi(WebSocketUrl.replace('localhost', '127.0.0.1'));
const log = new Log(conn);
// Subscribe to log events
await log.events.entryAdded();
await driver.executeScript('console.log("Hello Bidi")', [])
// listen to logEvent message and print
console.log(log.events.eventSubscriptionData)
})
after(async ()=> await driver.quit())
})
FAQs
WebDriver BiDi API for automation testing
The npm package wd-bidi receives a total of 13 weekly downloads. As such, wd-bidi popularity was classified as not popular.
We found that wd-bidi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.