
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
protractor-hotkeys
Advanced tools
An angular-hotkeys styled API for triggering keyboard shortcuts in Protractor tests
An angular-hotkeys styled API for triggering keyboard shortcuts in Protractor tests.
vanilla Protractor
// send ctrl+a to the webpage
browser.actions().keyDown(protractor.Key.CONTROL).sendKeys('a').perform();
protractor-hotkeys
var hotkeys = require('protractor-hotkeys');
hotkeys.trigger('ctrl+a');
// testing the konami code Easter Egg on your site is easy
hotkeys
.trigger('up up down down')
.trigger('left right left right')
.trigger('b a enter');
By default, all keyboard command sequences will target the <body>
tag, but you can pass in a targetElement
if you need to send keyboard shortcuts to someplace else on the page.
hotkeys.trigger('g g', { targetElement: $('.content-area') });
This works on Firefox and Chrome on Mac. I only test the easiest, platform-independent shortcuts. Hopefully I have captured most of the testing surface with these.
'i'
, 'I'
, '?'
)'g g'
, 'G G'
)'left'
, 'right'
)'f1'
, 'f10'
)'ctrl+up'
, 'shift+tab'
, 'alt+down'
)'capslock'
, 'delete'
, 'backspace'
, 'space'
, 'home'
, 'pageup
')mod
key (aka "super", aka ⌘, aka I make no promises about how this library will function using these keys. I did some local testing on a Mac, so the command key should work just as it does in angular-hotkeys (the 'mod'
string can be used, but it is mapped to Selenium's META
key). In the future, it may be worth it to use this library as a unifying interface between Linux, Mac, and Windows keyboard layouts.
If you are able to decide what keyboard shortcuts your app can use, please consider not using this "super" key. If you'd like to read up on it, this stackoverflow question has some good points. For the best experience, copy Github and stick with single character and shift-modifier shortcuts.
FAQs
An angular-hotkeys styled API for triggering keyboard shortcuts in Protractor tests
The npm package protractor-hotkeys receives a total of 122 weekly downloads. As such, protractor-hotkeys popularity was classified as not popular.
We found that protractor-hotkeys 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
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.