- Connect to remote Chrome instances! See the doc page for examples.
clear
API for clearing cookies and cache.
- Logging for new methods in 1.0.0
- Typos and other fixes
- Support for proxies
- Support for sites that use basic-auth via the
.auth(username, password
)` API - New
reload
API for reloading a page. - New
scroll
API for scrolling to x,y coordinates on a page. - New
back
API for going back in history. - New
forward
API for going forward in history. .screenshot
takes a selector for the element to capture.
- The
.screenshot
method no longer supports saving to the FS (Consumers can do this with thefs
module).
- When usin chains, and an error is thrown, Navalia will retry once and then fail the entire chain if the action fails again.
defaultTimeout
in thechromeOptions
of Navalia is now justtimeout
.
- Some issues in the chain pattern have been fixed.
- New chainable API!
- Most methods now return a value of some kind depending on the spirit.
- Some methods have different return values. Check the doc-site for the most up-to-date information.
- Better error messaging in
evaluate
.
- By default, most DOM API's will attempt to wait for the selector's appearance. You can override this by specifying a final arg with
{ wait: false }
. - Slimmed down the logs and re-organized them so that they log when things happen as opposed to about to happen.
- All API's will fail fast, IE: throwing when they don't find the selector you've specified.
- Consistent return values.
- GraphQL front-end!
- Most DOM-related API's now have a last argument of options to specify things like
timeout
andwait
. - Most API's will return a value indicating success or otherwise.
- New
attr
API that follows the same signature as jQuery's. - New
cookie
API that allows for interacting with site cookies.
coverage
now works for CSS!- We now use
prettier
, and this will run on commits to ensure some level of formatting/consistency is there.
- Some small bugfixes and better logging.
- New
.text
API for getting thetext
inside of an element (and it's children).
- Small fix in
evaluate
when anull
is returned (no longer throws).
- More tests! Thanks @mute!
fetch
API now returns all the data that comes with a network request.
fetch
: Prior to 0.0.19, fetch simply returned the response body. You can refernce that data in thebody
property of the response going forward:
// before
const it = await chrome.fetch('myurl');
console.log(it)
// after
const it = await chrome.fetch('myurl');
console.log(it.body);
fetch
-like API for running arbitrary network requests with familiar interface
- Turning back on tests :)
screenshot
now returns a Buffer of base64 encoded data when supplied with no path.- Links to external DOCS in the README.
focus
andtype
now emit native events and not synthetic JavaScript ones.
Navalia.kill
is now exposed so that it can be shutdown.Navalia.run
returns aPromise
for better orchestration around jobs.chrome.pageload
to wait for pageload on multi-page scripts.
wait
now accepts a dom-node selector to wait on.evaluate
can now run async functions as Navalia instruments Chrome properly.
- README logo fixes and npm meta data.
- New
save
method to capture page HTML (useful for SEO generation). - Package updates
- Minor logging improvements
- New
coverage
method on browser-api. Automate runtime coverage in an easy way - New
inject
method to inject css or js into a page. - Lots of docs and visual updates.
- No need to call
start
on eitherChrome
orNavalia
as they lazily begin execution. - New docs page at https://joelgriffith.github.io/navalia/
- Tighter error handling inside the browser API when things go wrong.
- Consolidated typings into a chrome-utility.
chrome.navigate
is nowchrome.goto
navalia.register
is nownavalia.run
- Both
chrome
andnavalia
no longer havestart
methods, just construct them and start using them.
Chrome
now parallelizes requests internally using tabs.ChromeTab
module for consolidating Browser API (not exported).- More verbose logging for debugging purposes.
- Lots of new browser API's:
type
,click
,check
,uncheck
,select
, andvisible
. More still to come.
- ALL browser API's have moved from their prior names to ALL lowercase. EG:
screenShot => screenshot
. This was done to help prevent fat-fingering. navalia.startup
is nownavalia.start
.- Debug logs now use
navalia:
prepended to better scope to this package. chrome.trigger
is no longer available. Look into methods likechrome.click
to replace prior behavior.chome.launch
now returns a Promise with atab
instance. It's thistab
instance that contains the browser API. This change was necessary to allow parallelization through tabs.chrome.destroy
is nowchrome.quit
to help onboard unfamiliar consumers since it's easier to reason about.
chrome.done
now cleans-up properly.Navalia
better handles cleanup internally when jobs are done.