deepsweet / Foxr
Licence: mit
🦊 Node.js API to control Firefox
Stars: ✭ 783
Programming Languages
typescript
32286 projects
Projects that are alternatives of or similar to Foxr
Marionette
Selenium alternative for Crystal. Browser manipulation without the Java overhead.
Stars: ✭ 119 (-84.8%)
Mutual labels: selenium, firefox, puppeteer, headless
Singlefilez
Web Extension for Firefox/Chrome/MS Edge and CLI tool to save a faithful copy of an entire web page in a self-extracting HTML/ZIP polyglot file
Stars: ✭ 882 (+12.64%)
Mutual labels: selenium, firefox, puppeteer
Singlefile
Web Extension for Firefox/Chrome/MS Edge and CLI tool to save a faithful copy of an entire web page in a single HTML file
Stars: ✭ 4,417 (+464.11%)
Mutual labels: selenium, firefox, puppeteer
Playwright Go
Playwright for Go a browser automation library to control Chromium, Firefox and WebKit with a single API.
Stars: ✭ 272 (-65.26%)
Mutual labels: selenium, firefox, headless
example-node-and-browser-qunit-ci
Example project with continuous integration for linting and cross-browser testing of isomorphic JavaScript.
Stars: ✭ 18 (-97.7%)
Mutual labels: firefox, headless
GeckoDriver ARMv6
Compiled binaries of Gecko Driver for ARMv6 architecture (cross-compiled)
Stars: ✭ 22 (-97.19%)
Mutual labels: firefox, selenium
Openrunner
Computest Openrunner: Benchmark and functional testing for frontend-heavy web applications
Stars: ✭ 16 (-97.96%)
Mutual labels: firefox, selenium
throughout
🎪 End-to-end testing made simple (using Jest and Puppeteer)
Stars: ✭ 16 (-97.96%)
Mutual labels: selenium, puppeteer
WhatsApp-Scraping
Python script to get WhatsApp iformation frrom WhatsApp Web
Stars: ✭ 76 (-90.29%)
Mutual labels: firefox, selenium
whatsapp-bot
Made with Python and Selenium, can be used to send multiple messages and send messages as characters made of emojis
Stars: ✭ 34 (-95.66%)
Mutual labels: firefox, selenium
Recorder
A browser extension that generates Cypress, Playwright and Puppeteer test scripts from your interactions 🖱 ⌨
Stars: ✭ 277 (-64.62%)
Mutual labels: firefox, puppeteer
page-modeller
⚙️ Browser DevTools extension for modelling web pages for automation.
Stars: ✭ 66 (-91.57%)
Mutual labels: selenium, puppeteer
WaWebSessionHandler
(DISCONTINUED) Save WhatsApp Web Sessions as files and open them everywhere!
Stars: ✭ 27 (-96.55%)
Mutual labels: firefox, selenium
TestLeafSeleniumTraining
This is public repository for Selenium Learners at TestLeaf
Stars: ✭ 80 (-89.78%)
Mutual labels: firefox, selenium
Socialmanagertools Igbot
🤖 📷 Instagram Bot made with love and nodejs
Stars: ✭ 699 (-10.73%)
Mutual labels: selenium, puppeteer
Puppeteer Api Zh cn
📖 Puppeteer中文文档(官方指定的中文文档)
Stars: ✭ 697 (-10.98%)
Mutual labels: puppeteer, headless
webparsy
Node.JS library and cli for scraping websites using Puppeteer (or not) and YAML definitions
Stars: ✭ 40 (-94.89%)
Mutual labels: headless, puppeteer
ipwatch
This program gets your external, & internal, IP addresses, checks them against your "saved" IP addresses and, if a difference is found, emails you the new IP(s). This is useful for servers at residential locations whose IP address may change periodically due to actions by the ISP.
Stars: ✭ 38 (-95.15%)
Mutual labels: headless, remote
foxr
Node.js API to control Firefox.
- uses a built-in Marionette through remote protocol
- no Selenium WebDriver is needed
- works with Headless mode
- compatible subset of Puppeteer API
At this point Foxr is more a proof of concept, work is pretty much in progress.
Example
Run a locally installed Firefox:
/path/to/firefox -headless -marionette -safe-mode
Or a dockerized version:
docker run -it --rm --shm-size 2g -p 2828:2828 deepsweet/firefox-headless-remote:68
import foxr from 'foxr'
// const foxr = require('foxr').default
(async () => {
try {
const browser = await foxr.connect()
const page = await browser.newPage()
await page.goto('https://example.com')
await page.screenshot({ path: 'example.png' })
await browser.close()
} catch (error) {
console.error(error)
}
})()
Install
yarn add --dev foxr
# or
npm install --save-dev foxr
API
Foxr
connect
Connect to the Marionette endpoint.
type TConnectOptions = {
host?: string,
port?: number,
defaultViewport?: {
width?: number,
height?: number
}
}
foxr.connect(options?: TConnectOptions): Promise<Browser>
-
host
–'localhost'
by default -
port
–2828
by default -
defaultViewport
-
width
–800
by default -
height
–600
by default
-
launch
type TLaunchOptions = {
args?: string[],
dumpio?: boolean,
executablePath: string,
headless?: boolean
} & TConnectOptions
foxr.launch(options?: TLaunchOptions): Promise<Browser>
-
args
– array of additional args,['-marionette', '-safe-mode', '-no-remote']
by default -
dumpio
– print browser process stdout and stderr,false
by default -
executablePath
– path to Firefox executable, required -
headless
– whether to run browser in headless mode,true
by default
Browser
close
browser.close(): Promise<void>
disconnect
browser.disconnect(): Promise<void>
newPage
browser.newPage(): Promise<Page>
pages
browser.pages(): Promise<Page[]>
install
browser.install(extensionPath: string, isTemporary: boolean): Promise<string | null>
uninstall
browser.install(extensionId: string): Promise<void>
getPref
browser.getPref(pref: string, defaultBranch: boolean = false): Promise<any>
setPref
browser.setPref(pref: string, value: string | number | boolean, defaultBranch: boolean = false): Promise<void>
Page
$
page.$(selector: string): Promise<ElementHandle | null>
$$
page.$$(selector: string): Promise<ElementHandle[]>
$eval
page.$eval(selector: string, func: TSerializableFunction, ...args: TEvaluateArg[]): Promise<TJsonValue | void>
$$eval
page.$$eval(selector: string, func: TSerializableFunction, ...args: TEvaluateArg[]): Promise<Array<TJsonValue | void>>
bringToFront
page.bringToFront(): Promise<void>
browser
page.browser(): TBrowser
close
page.close(): Promise<void>
content
page.content(): Promise<string>
evaluate
page.evaluate(target: string): Promise<TJsonValue | void>
page.evaluate(target: TSerializableFunction, ...args: TEvaluateArg[]): Promise<TJsonValue | void>
evaluateHandle
page.evaluate(target: string): Promise<JSHandle>
page.evaluate(target: TSerializableFunction, ...args: TEvaluateArg[]): Promise<JSHandle>
focus
page.focus(selector: string): Promise<void>
goto
page.goto(url: string): Promise<void>
screenshot
page.screenshot(options?: { path?: string }): Promise<Buffer>
setContent
page.setContent(html: string): Promise<void>
title
page.title(): Promise<string>
url
page.url(): Promise<string>
viewport
page.viewport(): Promise<{ width: number, height: number }>
JSHandle
…
ElementHandle
$
elementHandle.$(selector: string): Promise<ElementHandle | null>
$$
elementHandle.$$(selector: string): Promise<ElementHandle[]>
click
type TOptions = {
button?: 'left' | 'middle' | 'right',
clickCount?: number
}
elementHandle.click(options?: TOptions): Promise<void>
focus
elementHandle.focus(): Promise<void>
hover
elementHandle.hover(): Promise<void>
press
elementHandle.press(key: string): Promise<void>
Where key
is of the possible keys or a single character.
screenshot
elementHandle.screenshot(options?: { path?: string }): Promise<Buffer>
type
elementHandle.type(text: string): Promise<void>
Development
See my Start task runner preset for details.
References
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].