
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@cucumber-e2e/po2
Advanced tools
This library provides the ability to create hierarchical page objects and access elements using plain-english selectors. Works on top of webdriverIO.
npm install @cucumber-e2e/po2
Lib provides getElement method that resolves plain-english selector and return webdriverIO element or array of webdriverIO element.
const { po } = require('@cucumber-e2e/po2');
When(/^click '(.+)'$/, async function (alias) {
const element = await po.getElement(alias);
await element.waitForClickable();
await element.click();
});
When click '#1 of Multiple Component > Child Item'
Lib provides capability to get single element from collection by index (#index of Collection) or inner text (#text in Collection).
Lib provides two methods $ and $$ that allow registering elements and collections. An element can be defined in form of webdriverIO selector or as an instance of the component class.
Each not top-level component should have selector element in form of webdriverIO selector.
const { $, $$ } = require('@cucumber-e2e/po2');
class MultipleComponent {
selector = '.list-components li';
ChildItem = $('div');
}
class SingleComponent {
selector = '.container';
ChildItem = $('.child-item');
}
class App {
SingleElement = $('.single-element');
List = $$('.list li');
SingleComponent = $(new SingleComponent());
MultipleComponents = $$(new MultipleComponent());
}
module.exports = new App();
Before using po object need to be initiated and hierarchy of elements needs to be registered The best place to do it is cucumber-js Before hook
const { po } = require('@cucumber-e2e/po2');
const pos = require('./app.js');
Before(async function() {
po.init(browser, { timeout: 10000 }); // browser is webdriverIO browser object
po.register(pos); // pos is page object hierarchy
});
FAQs
library for plain-english access page object access
We found that @cucumber-e2e/po2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.