Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Simple file format for puppeteer-based End-to-end tests:
goto https://saltcorn.com
status 200
contains platform for building database
containsnot platform for building databse
run with
npx pupcheck
pupcheck [-Hhv] [file ...]
Command line switches:
-H : Headful; open browser window
-v : verbose
-h, --help : help
Chrome or chromium need to be installed and accessible. If this is in a non-standard location, set the
PUPPETEER_CHROMIUM_BIN
environment variable.
Set the base URL with the PUPCHECK_BASE_URL
environment variable. Then you can use a relative URL; for example
goto /
npx clear-npx-cache
to delete an old version of pupcheck installed with npx
, then run npx pupcheck
0 again.
The pupcheck file consists of a number of one-word commands, followed by the arguments to that command. If the command takes a free text argument, this will be the last argument and will consist of the rest of the line.
The command is case insensitive, so you can use camelCase.
# This is a comment but only if # is first character
If your selector has a space due to choosing a child element, wrap in parentheses.
goto {url}
Navigate to this URL
Example: goto https://google.com
status {status code}
Assert this status code
Example: status 200
contains {contents}
Assert this is in the page contents
Example: contains Tasks completed
containsnot {contents}
(also contains_not
)
Assert this is in not in the page contents
Example: containsNot An error occurred
click {selector}
Click the selected element and wait for navigation to complete
Example: click button#click_me
waitfor {selector}
(also wait_for
)
Wait until this element becomes present
Example: waitfor button#click_me
type {selector} {text}
Type the text into the selected input element.
Examples: type input#full_name John Smith
, type (#question-name input) Walt Whitman
slowlytype {selector} {text}
(also slowly_type
)
Type the text SLOWLY into the selected input element.
Examples: slowly_type input#full_name John Smith
, slowlyType (#question-name input) Walt Whitman
select {selector} {value}
Set the value of a drop-down <select>
element
Examples: select select#role 5
erase {selector} {nchars}
Erase characters from the selected input element.
Examples: erase input#full_name 9
evaltrue {js-expr-string}
(also eval_true
)
Assert that this expression must evaluate to true
Examples: eval_true $("input#full_name").val()==="Miles Davis"
sleep {milliseconds}
Sleep for this many milliseconds
Example: sleep 1000
example.pch
contents:
goto https://example.com/
# Login
type input#id_username egergerarg@gmail.com
type input#id_password grehq4hhq32534534t
click input[type=submit]
# Check dashboard loads
contains Tasks completed
How to run:
npx pupcheck example.pch
FAQs
E2E test scripting through puppeteer
The npm package pupcheck receives a total of 78 weekly downloads. As such, pupcheck popularity was classified as not popular.
We found that pupcheck 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 uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.