Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
fp-ts-webdriver
Advanced tools
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
W3C Webdriver API, optimized for usage with fp-ts.
The goal is to be compatible with the W3C Recommendation
A webdriver sends requests and returns responses. We send a request to a driver (chromdriver, geckodriver), it opens up an instance of the browser and runs our requests in real time.
Please keep in mind that this is package is experiemental and not enough tests have been written.
# yarn
## peer dependencies
yarn add fp-ts fp-ts-std io-ts monocle-ts newtype-ts
yarn add fp-ts-webdriver@next
# npm
# peer dependencies
npm install fp-ts fp-ts-std io-ts monocle-ts newtype-ts
npm install fp-ts-webdriver@next
There is currently one named export webdriver
that exports a namespace of all API's related to the basic webdriver protocol.
When more are added, they'll be available under chrome
, firefox
and edge
respectively.
These will be separated so we can have better intellicense and troubleshooting.
For this examples to function, you have to turn on your webdriver.
With chromedriver the command is chromedriver --port=4444
import { webdriver as WD, readerReaderTaskEither as RRTE } from "fp-ts-webdriver"
import { pipe } from "fp-ts/lib/function"
import { readerTaskEither as RTE, taskEither as TE } from "fp-ts"
const searchBar = WD.findElement("css selector", "input[name=\"q\"]")
const searchButton = WD.findElement("css selector", "input[value=\"Google Search\"]")
const program = pipe(
WD.navigateTo("https://google.com.au"),
RRTE.chain(() => searchBar),
RRTE.chainFirst((element) => WD.sendKeys("dogs")(element)),
RRTE.chain(() => searchButton)
RRTE.chain(element => WD.elementClick(element))
)
export const capabilities: WD.Capabilities = {}
const dependencies:WD.Dependencies = {
url: "localhost:4444",
}
// creates a session and closes it after runnning `program`
const main = pipe(
program, WD.runSession(capabilities)
)
// TE.TaskEither<WD.Errors, void>
main(dependencies)()
We have tests in chromedriver and will expand to other drivers like geckodriver when the time comes.
We're adding features as WE need them in our other projects.
If you would like something in particular, just ask! We're not taking donations at this stage.
Category | :o: | Command |
---|---|---|
Session | :heavy_check_mark: | newSession |
:heavy_check_mark: | deleteSession | |
:heavy_check_mark: | status | |
:heavy_check_mark: | getTimeouts | |
:heavy_check_mark: | setTimeouts | |
Navigation | :heavy_check_mark: | navigateTo |
:heavy_check_mark: | getCurrentUrl | |
:heavy_check_mark: | back | |
:heavy_check_mark: | forward | |
:heavy_check_mark: | refresh | |
:heavy_check_mark: | getTitle | |
Command Contexts | :o: | getWindowHandle |
:o: | closeWindow | |
:o: | switchToWindow | |
:o: | getWindowHandles | |
:o: | switchtoFrame | |
:o: | switchToParentFrame | |
:o: | getWindowRect | |
:o: | setWindowRect | |
:o: | maximizeWindow | |
:o: | minimizeWindow | |
Element Retrieval | :heavy_check_mark: | findElement |
:o: | findElements | |
:o: | findElementFromElement | |
:o: | findElementsFromElement | |
Element State | :o: | isElementSelected |
:heavy_check_mark: | getElementAttribute | |
:o: | getElementProperty | |
:o: | getElementCSSValue | |
:o: | getElementText | |
:o: | getElementTagName | |
:o: | getElementRect | |
:o: | isElementEnabled | |
Element Interaction | :o: | elementClick |
:o: | elementClear | |
:heavy_check_mark: | elementSendKeys | |
Document Handling | :o: | getPageSource |
:o: | executeScript | |
:o: | executeAsyncScript | |
Cookies | :o: | getAllCookies |
:o: | getNamedCookie | |
:o: | addCookie | |
:o: | deleteCookie | |
:o: | deleteAllCookies | |
Actions | :heavy_check_mark: | performActions |
:heavy_check_mark: | releaseActions | |
User Prompts | :o: | dismissAlert |
:o: | acceptAlert | |
:o: | getAlertText | |
:o: | sendAlertText | |
Screen Capture | :o: | takeScreenshot |
:o: | takeElementScreenshot |
gh repo fork waynevanson/fp-ts-webdriver --clone --remote
yarn install
yarn test
yarn add -D chromedriver
to run it's install script, where it will install chromedriver on your machine.readme.md
under the feature name from :o:
to :heavy_check_mark:
<fix|feat|docs|build|tests>: <message>
, which is used to generate a changelog.git pull --rebase
.git push
4.0.0-next.2 (2021-02-21)
FAQs
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
The npm package fp-ts-webdriver receives a total of 0 weekly downloads. As such, fp-ts-webdriver popularity was classified as not popular.
We found that fp-ts-webdriver 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.