
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Tamarin allows the tester/developer to concentrate on the functionality that needs to be tested rather than the boiler-plate code around it in order for the test to work.
I have often asked myself As a user would I ever click on an invisible link, type in a disabled field or select an item from a dynamically loaded dropdown that hadn't loaded yet? My answer was of course I wouldn't! so why do we have to write tests to make sure this doesn't happen? What if all that extra code was abstracted away and all you had to do was implement a one-line "click" and everything else was taken care of?
Tamarin can be used with or without cucumber.js.
Note the following files taken from the example project: tamarin-vanilla-example.
index.js
const googleSearch = require('./google_search')
googleSearch.test()
.then(() => {
console.log('Google search completed successfully')
googleSearch.quit()
})
.catch((err) => {
console.error('Google search failed')
googleSearch.quit()
throw err
})
google_search.js
const World = require('./world').World
const world = new World()
const page = {
'search': { css: '[title="Search"]' },
'navLink': { xpath: '//*[@role="navigation"]//a[text()="Images"]' },
'results': { css: 'img[alt="Image result for Tamarin"]' }
}
module.exports = {
quit: () => world.quit(),
test: () => world.visit('http://google.com')
.then(() => world.waitForTitle('Google'))
.then(() => world.sendKeys(page.search, 'Tamarin' + '\n'))
.then(() => world.click(page.navLink))
.then(() => world.waitFor(page.results))
}
world.js
'use strict'
const driver = require('./driver')
const tamarin = require('tamarin')
module.exports = {
World: class extends tamarin {
constructor () {
super(driver())
}
quit () {
return this.getDriver()
.then((driver) => driver.quit())
}
}
}
driver.js
'use strict'
const webDriver = require('selenium-webdriver')
const chrome = require('selenium-webdriver/chrome')
const service = new chrome.ServiceBuilder(require('chromedriver').path).build()
chrome.setDefaultService(service)
module.exports = function () {
return new webDriver.Builder()
.withCapabilities(webDriver.Capabilities.chrome())
.build()
}
Under the hood, tamarin waits until an element exists, is visible and enabled prior to performing such actions such as clicking a button or keying text into an input field.
tamarin contains the following functions within the tamarin world object:
Tamarin is available as an npm module.
$ npm i tamarin -D
More to come!
FAQs
Tamarin: extendable asynchronous wrapper around selenium-webdriver
The npm package tamarin receives a total of 11 weekly downloads. As such, tamarin popularity was classified as not popular.
We found that tamarin 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.