mirror of
https://github.com/checkly/headless-recorder.git
synced 2021-07-28 02:03:42 +03:00
fix: bring develop up to date with master again...
This commit is contained in:
2
.github/FUNDING.yml
vendored
Normal file
2
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
custom: ['https://www.buymeacoffee.com/UJGejcNli']
|
||||
@@ -19,5 +19,6 @@ before_install:
|
||||
install:
|
||||
- npm install
|
||||
script:
|
||||
- npm run lint
|
||||
- npm run build
|
||||
- NODE_ENV=production npm test
|
||||
|
||||
12
README.md
12
README.md
@@ -2,17 +2,19 @@
|
||||
|
||||
[](https://travis-ci.org/checkly/puppeteer-recorder)
|
||||
|
||||
[](https://www.buymeacoffee.com/UJGejcNli)
|
||||
#### Gold sponsor
|
||||
[<img src="chrome-store/checkly-logo.png?raw=true" alt="Checkly" width="300">](https://checklyhq.com?utm_source=github&utm_medium=sponsor-logo-github&utm_campaign=puppeteer-recorder)
|
||||
|
||||

|
||||
|
||||
⭐️ We just published an update on the glorious future of Puppeteer Recorder, [check out this pinned issue](https://github.com/checkly/puppeteer-recorder/issues/83) ⭐️
|
||||
|
||||
Puppeteer recorder is a Chrome extension that records your browser interactions and generates a
|
||||
[Puppeteer](https://github.com/GoogleChrome/puppeteer) script. Install it from the [Chrome Webstore](https://chrome.google.com/webstore/detail/puppeteer-recorder/djeegiggegleadkkbgopoonhjimgehda).
|
||||
This project is pretty fresh, but does the following already:
|
||||
|
||||
- Records clicks and type events.
|
||||
- Add waitForNavigation, setViewPort and other useful clauses.
|
||||
- Add waitForNavigation, setViewPort and other useful clauses.
|
||||
- Generates a Puppeteer script.
|
||||
- Shows which events are being recorded.
|
||||
- Copy to clipboard.
|
||||
@@ -27,11 +29,11 @@ This project is pretty fresh, but does the following already:
|
||||
- Hit <kbd>tab</kbd> after you finish typing in an `input` element.
|
||||
- Click links, inputs and other elements.
|
||||
- Wait for full page load on each navigation. The icon will switch from  to .
|
||||
- Click Pause when you want to navigate without recording anything. Hit Resume to continue recording.
|
||||
- Click Pause when you want to navigate without recording anything. Hit Resume to continue recording.
|
||||
## Background
|
||||
|
||||
Writing Puppeteer scripts for scraping, testing and monitoring can be tricky. A recorder / code generator can be helpful,
|
||||
even if the code isn't perfect. This project builds on other projects (see [disclaimer](#user-content-credits--disclaimer)
|
||||
even if the code isn't perfect. This project builds on other projects (see [disclaimer](#user-content-credits--disclaimer)
|
||||
below) but adds extensibility, configurability and a smoother UI.
|
||||
|
||||
## Development
|
||||
@@ -58,7 +60,7 @@ gren release --override --data-source=milestones --milestone-match="{{tag_name}}
|
||||
|
||||
## Credits & disclaimer
|
||||
|
||||
Puppeteer recorder is the spiritual successor & love child of segment.io's
|
||||
Puppeteer recorder is the spiritual successor & love child of segment.io's
|
||||
[Daydream](https://github.com/segmentio/daydream) and [ui recorder](https://github.com/yguan/ui-recorder).
|
||||
|
||||
## License
|
||||
|
||||
BIN
chrome-store/checkly-logo.png
Normal file
BIN
chrome-store/checkly-logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
@@ -1,5 +1,4 @@
|
||||
import puppeteer from 'puppeteer'
|
||||
import _ from 'lodash'
|
||||
import {launchPuppeteerWithExtension, runDist} from '../../__e2e-tests__/helpers'
|
||||
import { waitForAndGetEvents, cleanEventLog, startServer } from './helpers'
|
||||
|
||||
@@ -50,5 +49,4 @@ describe.only('attributes', () => {
|
||||
const event = (await waitForAndGetEvents(page, 1))[0]
|
||||
expect(event.selector).toEqual('body > #content-root > [data-qa="article-wrapper"] > [data-qa="article-body"] > span')
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
@@ -28,12 +28,12 @@ export const startServer = function (buildDir, file) {
|
||||
let server
|
||||
let port
|
||||
const retry = (e) => {
|
||||
if(e.code == 'EADDRINUSE') {
|
||||
if (e.code === 'EADDRINUSE') {
|
||||
setTimeout(() => connect, 1000)
|
||||
}
|
||||
}
|
||||
const connect = () => {
|
||||
port = 0|(Math.random() * 1000) + 3000
|
||||
port = 0 | (Math.random() * 1000) + 3000
|
||||
server = app.listen(port)
|
||||
server.once('error', retry)
|
||||
server.once('listening', () => {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* eslint-disable */
|
||||
|
||||
export default (function(){var E;var g=window,n=document,p=function(a){var b=g._gaUserPrefs;if(b&&b.ioo&&b.ioo()||a&&!0===g["ga-disable-"+a])return!0;try{var c=g.external;if(c&&c._gaUserPrefs&&"oo"==c._gaUserPrefs)return!0}catch(f){}a=[];b=n.cookie.split(";");c=/^\s*AMP_TOKEN=\s*(.*?)\s*$/;for(var d=0;d<b.length;d++){var e=b[d].match(c);e&&a.push(e[1])}for(b=0;b<a.length;b++)if("$OPT_OUT"==decodeURIComponent(a[b]))return!0;return!1};var q=function(a){return encodeURIComponent?encodeURIComponent(a).replace(/\(/g,"%28").replace(/\)/g,"%29"):a},r=/^(www\.)?google(\.com?)?(\.[a-z]{2})?$/,u=/(^|\.)doubleclick\.net$/i;function Aa(a,b){switch(b){case 0:return""+a;case 1:return 1*a;case 2:return!!a;case 3:return 1E3*a}return a}function Ba(a){return"function"==typeof a}function Ca(a){return void 0!=a&&-1<(a.constructor+"").indexOf("String")}function F(a,b){return void 0==a||"-"==a&&!b||""==a}function Da(a){if(!a||""==a)return"";for(;a&&-1<" \n\r\t".indexOf(a.charAt(0));)a=a.substring(1);for(;a&&-1<" \n\r\t".indexOf(a.charAt(a.length-1));)a=a.substring(0,a.length-1);return a}
|
||||
function Ea(){return Math.round(2147483647*Math.random())}function Fa(){}function G(a,b){if(encodeURIComponent instanceof Function)return b?encodeURI(a):encodeURIComponent(a);H(68);return escape(a)}function I(a){a=a.split("+").join(" ");if(decodeURIComponent instanceof Function)try{return decodeURIComponent(a)}catch(b){H(17)}else H(68);return unescape(a)}var Ga=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,!!d):a.attachEvent&&a.attachEvent("on"+b,c)};
|
||||
function Ia(a,b){if(a){var c=J.createElement("script");c.type="text/javascript";c.async=!0;c.src=a;c.id=b;a=J.getElementsByTagName("script")[0];a.parentNode.insertBefore(c,a);return c}}function K(a){return a&&0<a.length?a[0]:""}function L(a){var b=a?a.length:0;return 0<b?a[b-1]:""}var nf=function(){this.prefix="ga.";this.values={}};nf.prototype.set=function(a,b){this.values[this.prefix+a]=b};nf.prototype.get=function(a){return this.values[this.prefix+a]};
|
||||
|
||||
Reference in New Issue
Block a user