- Connect to remote Chrome instances! See the doc page for examples.
clearAPI 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
reloadAPI for reloading a page. - New
scrollAPI for scrolling to x,y coordinates on a page. - New
backAPI for going back in history. - New
forwardAPI for going forward in history. .screenshottakes a selector for the element to capture.
- The
.screenshotmethod no longer supports saving to the FS (Consumers can do this with thefsmodule).
- When usin chains, and an error is thrown, Navalia will retry once and then fail the entire chain if the action fails again.
defaultTimeoutin thechromeOptionsof 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
timeoutandwait. - Most API's will return a value indicating success or otherwise.
- New
attrAPI that follows the same signature as jQuery's. - New
cookieAPI that allows for interacting with site cookies.
coveragenow 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
.textAPI for getting thetextinside of an element (and it's children).
- Small fix in
evaluatewhen anullis returned (no longer throws).
- More tests! Thanks @mute!
fetchAPI 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 thebodyproperty 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 :)
screenshotnow returns a Buffer of base64 encoded data when supplied with no path.- Links to external DOCS in the README.
focusandtypenow emit native events and not synthetic JavaScript ones.
Navalia.killis now exposed so that it can be shutdown.Navalia.runreturns aPromisefor better orchestration around jobs.chrome.pageloadto wait for pageload on multi-page scripts.
waitnow accepts a dom-node selector to wait on.evaluatecan now run async functions as Navalia instruments Chrome properly.
- README logo fixes and npm meta data.
- New
savemethod to capture page HTML (useful for SEO generation). - Package updates
- Minor logging improvements
- New
coveragemethod on browser-api. Automate runtime coverage in an easy way - New
injectmethod to inject css or js into a page. - Lots of docs and visual updates.
- No need to call
starton eitherChromeorNavaliaas 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.navigateis nowchrome.gotonavalia.registeris nownavalia.run- Both
chromeandnavaliano longer havestartmethods, just construct them and start using them.
Chromenow parallelizes requests internally using tabs.ChromeTabmodule 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.startupis nownavalia.start.- Debug logs now use
navalia:prepended to better scope to this package. chrome.triggeris no longer available. Look into methods likechrome.clickto replace prior behavior.chome.launchnow returns a Promise with atabinstance. It's thistabinstance that contains the browser API. This change was necessary to allow parallelization through tabs.chrome.destroyis nowchrome.quitto help onboard unfamiliar consumers since it's easier to reason about.
chrome.donenow cleans-up properly.Navaliabetter handles cleanup internally when jobs are done.