hkang1 / taiko-video Goto Github PK
View Code? Open in Web Editor NEWA taiko plugin to record screencast as an mp4 video
License: MIT License
A taiko plugin to record screencast as an mp4 video
License: MIT License
@hkang1 Can you please bump the version with the latest.
Unable to debug the script in VS Code when Taiko Video is implemented in the project. [VS Code, Gauge, Taiko]
When I try to debug the scenario in VS code, the tests are immediately marked as passed. When I uninstall taiko video using npm uninstall taiko-video
then I'm able to debug the code successfully.
Runner Ready for Debugging
Debugger listening on ws://127.0.0.1:61280/bef90792-5cbf-472b-a4ab-d70eabcfe148
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
# Admin operations
## Admin should be able to merge patients
Success: Tests passed.
❯ taiko example.js --plugin video
✔ Browser opened
✔ Browser closed
Error: Navigation to url https://www.linkedin.com/in/caleb-kang-8493651/ failed.
STATUS: 999, STATUS_TEXT:
at Object.handleNavigation (/home/varac/lib/node_modules/taiko/lib/handlers/pageHandler.js:199:13)
at async /home/varac/lib/node_modules/taiko/lib/taiko.js:745:16
at async doActionAwaitingNavigation (/home/varac/lib/node_modules/taiko/lib/doActionAwaitingNavigation.js:61:5)
at async module.exports.goto (/home/varac/lib/node_modules/taiko/lib/taiko.js:744:3)
at async module.exports.<computed> (/home/varac/lib/node_modules/taiko/lib/taiko.js:2622:14)
at async global.<computed> (/home/varac/lib/node_modules/taiko/bin/runFile.js:38:15)
at async /home/varac/projects/testing/taiko/taiko-video/example.js:9:5
The linkedin url needs authentication. Please provide a different example script that works out of the box.
@hkang1 I'm trying to use taiko-video and I it fails with below error
Runner: mocha
"after all" hook: afterAll in "{root}" Error: WebSocket is not open: readyState 3 (CLOSED)
at sendAfterClose (node_modules/ws/lib/websocket.js:900:17)
at WebSocket.send (node_modules/ws/lib/websocket.js:402:7)
at Proxy._enqueueCommand (node_modules/chrome-remote-interface/lib/chrome.js:286:18)
at /Users/***/Documents/***/node_modules/chrome-remote-interface/lib/chrome.js:88:22
at new Promise (<anonymous>)
at Proxy.send (node_modules/chrome-remote-interface/lib/chrome.js:87:20)
at pause (node_modules/taiko-video/src/index.js:57:23)
at Object.stop [as stopRecording] (node_modules/taiko-video/src/index.js:65:9)
at Context.afterAll (src/mochaHooks.js:50:17)
at processImmediate (node:internal/timers:464:21)
Error: WebSocket is not open: readyState 3 (CLOSED)
at sendAfterClose (node_modules/ws/lib/websocket.js:900:17)
at WebSocket.send (node_modules/ws/lib/websocket.js:402:7)
at Proxy._enqueueCommand (node_modules/chrome-remote-interface/lib/chrome.js:286:18)
at /Users/****/node_modules/chrome-remote-interface/lib/chrome.js:88:22
at new Promise (<anonymous>)
at Proxy.send (node_modules/chrome-remote-interface/lib/chrome.js:87:20)
at pause (node_modules/taiko-video/src/index.js:57:23)
at Object.stop [as stopRecording] (node_modules/taiko-video/src/index.js:65:9)
at Context.afterAll (src/mochaHooks.js:50:17)
at processImmediate (node:internal/timers:464:21)
mochaHooks.js
exports.mochaHooks = {
async beforeAll() {
await openBrowser({ headless: IS_HEADLESS });
await goto(BASE_URL);
await login(USER_NAME, PASSWORD);
await waitFor(async () => {
const url = await currentURL();
return url === GRID_URL;
}, 10000);
},
async afterAll() {
await closeBrowser();
},
async beforeEach() {
setConfig({
retryInterval: 100,
retryTimeout: 30000,
navigationTimeout: 40000,
ignoreSSLErrors: true,
});
await openIncognitoWindow(GRID_URL, {
name: 'admin',
waitForNavigation: true,
});
await video.startRecording('output/video.mp4');
},
async afterEach() {
if (this.currentTest.state !== 'passed') {
await screenshot({
path: `${screenShotPath}/${this.currentTest.title.replace(/ /g, '_')}.png`,
});
}
await video.stopRecording();
await clearIntercept();
await closeIncognitoWindow();
},
};
Video output is too fast (even with waitFor(1000)).
Should expose option to slow down video.
Hi Team,
I have been using Taiko + Gauge and decided to install this plugin after proper installation of ffmpeg to record the mp4 video of a taiko script run.
This records video of any length/full script when not used with Gauge, i.e. the example taiko script.
But when used with Gauge, it only records a video for first 10 seconds or 11 seconds max. It is not able to record the video for entire script run. Is this some configuration issue or issue with Gauge.
I have tried running it by command as well :
None of them worked. The video length still came out to be 10 seconds.
Here's Gauge step implementation I have used:
step("Start a recording", async function () {
await video.startRecording("vid/1211.mp4");
});
step("Stop a recording", async function () {
await video.stopRecording();
});
Here's the Gauge log for the same:
ffmpeg version 4.4.1
Copyright (c) 2000-2021 the FFmpeg developers
built with Apple clang version 13.0.0 (clang-1300.0.29.3)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.4.1_3 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-avresample --enable-videotoolbox
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Input #0, image2, from 'vid/1211%04d.jpeg':
Duration:
00:00:03.16, start: 0.000000
, bitrate: N/A
Stream #0:0
: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 1278x676 [SAR 1:1 DAR 639:338], 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0
(mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[swscaler @ 0x7ff0689df000]
deprecated pixel format used, make sure you did set range correctly
[libx264 @ 0x7ff06a009a00]
using SAR=3739/3516
[libx264 @ 0x7ff06a009a00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7ff06a009a00]
profile High, level 3.1, 4:2:0, 8-bit
[libx264 @ 0x7ff06a009a00]
264 - core 163 r3060 5db6aa6 - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=1000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'vid/1211.mp4':
Metadata:
encoder :
Lavf58.76.100
Stream #0:0: Video: h264 (avc1 / 0x31637661), yuvj420p(pc, bt470bg/unknown/unknown, progressive), 1280x720 [SAR 5751:5408 DAR 639:338], q=2-31, 1000 kb/s,
25 fps,
12800 tbn
Metadata:
encoder : Lavc58.134.100 libx264
Side data:
cpb:
bitrate max/min/avg: 0/0/1000000 buffer size: 0
vbv_delay: N/A
frame= 1 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
frame= 79 fps=0.0 q=13.0 size= 0kB time=00:00:01.04 bitrate= 0.4kbits/s dup=53 drop=0 speed=2.08x
frame= 179 fps=178 q=0.0 size= 0kB time=00:00:05.04 bitrate= 0.1kbits/s dup=121 drop=0 speed=5.02x
frame= 241 fps=160 q=0.0 size= 0kB time=00:00:07.52 bitrate= 0.1kbits/s dup=163 drop=0 speed=4.98x
frame= 245 fps=132 q=-1.0 Lsize= 449kB time=00:00:09.68 bitrate= 379.8kbits/s dup=166 drop=0 speed=5.21x
video:445kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.831505%
[libx264 @ 0x7ff06a009a00] frame I:4 Avg QP: 5.13 size: 19860
[libx264 @ 0x7ff06a009a00] frame P:63 Avg QP: 1.73 size: 5270
[libx264 @ 0x7ff06a009a00] frame B:178 Avg QP: 3.65 size: 245
[libx264 @ 0x7ff06a009a00] consecutive B-frames: 2.9% 0.0% 2.4% 94.7%
[libx264 @ 0x7ff06a009a00] mb I I16..4: 81.7% 14.3% 4.0%
[libx264 @ 0x7ff06a009a00] mb P I16..4: 2.7% 0.1% 0.4% P16..4: 2.4% 0.2% 0.2% 0.0% 0.0% skip:93.9%
[libx264 @ 0x7ff06a009a00] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.9% 0.0% 0.0% direct: 0.1% skip:98.9% L0:37.3% L1:62.6% BI: 0.1%
[libx264 @ 0x7ff06a009a00] final ratefactor: -3.32
[libx264 @ 0x7ff06a009a00] 8x8 transform intra:10.7% inter:35.1%
[libx264 @ 0x7ff06a009a00] coded y,uvDC,uvAC intra: 9.7% 10.9% 10.4% inter: 0.2% 0.4% 0.4%
[libx264 @ 0x7ff06a009a00] i16 v,h,dc,p: 72% 25% 3% 0%
[libx264 @ 0x7ff06a009a00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 46% 10% 40% 1% 1% 1% 1% 0% 1%
[libx264 @ 0x7ff06a009a00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 27% 24% 4% 5% 5% 5% 4% 5%
[libx264 @ 0x7ff06a009a00] i8c dc,h,v,p: 76% 19% 5% 0%
[libx264 @ 0x7ff06a009a00] Weighted P-Frames: Y:3.2% UV:3.2%
[libx264 @ 0x7ff06a009a00] ref P L0: 90.4% 1.5% 4.7% 3.4%
[libx264 @ 0x7ff06a009a00] ref B L0: 79.5% 19.9% 0.6%
[libx264 @ 0x7ff06a009a00] ref B L1: 99.5% 0.5%
[libx264 @ 0x7ff06a009a00]
kb/s:371.51
Successfully generated html-report to => FilePath
Specifications: 1 executed 1 passed 0 failed 0 skipped
Scenarios: 1 executed 1 passed 0 failed 0 skipped
Total time taken: 1m57.867s
Updates are available. Run gauge update -c
for more info.
Success: Tests passed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.