Youzan Coder
Youzan Coder
Mar 31, 2021 · Frontend Development

Boost UI Test Stability: Practical Puppeteer & Mocha Strategies

This article shares a year‑long experience of UI automation at Youzan, covering how to select stable business scenarios, choose Puppeteer with Mocha, implement robust element locating, handle dynamic data via API interception, apply wait and retry mechanisms, capture screenshots, log responses, and integrate tests into CI pipelines for reliable regression testing.

API interceptionCI integrationPuppeteer
0 likes · 13 min read
Boost UI Test Stability: Practical Puppeteer & Mocha Strategies
Baidu Tech Salon
Baidu Tech Salon
Oct 17, 2014 · Information Security

How to Hook and Hide JavaScript APIs to Thwart XSS Attacks

This article explores practical techniques for intercepting and protecting JavaScript APIs—such as setAttribute—using MutationObserver, API hooks, random token naming, property hiding, and recursive iframe monitoring to build a resilient front‑end defense against XSS and other injection attacks.

API interceptionHookJavaScript
0 likes · 14 min read
How to Hook and Hide JavaScript APIs to Thwart XSS Attacks