Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
退屈なブラウザ作業をpuppeteerにやらせたいお話
Search
Tadashi Nemoto
March 06, 2018
Programming
2k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
退屈なブラウザ作業をpuppeteerにやらせたいお話
SRE-SET Automation Night #2
https://mercari.connpass.com/event/79046/
Tadashi Nemoto
March 06, 2018
More Decks by Tadashi Nemoto
See All by Tadashi Nemoto
コンテナイメージの脆弱性を削減する新しいアプローチ:Hardened Container Images
tadashi0713
1
360
Best Practice CI/CD Pipeline for Deploying Container Apps to AWS
tadashi0713
0
300
Scalable and cloud-native mobile game CI/CD environment using Unity
tadashi0713
0
180
Migrating your mobile CI/CD environment to a scalable cloud solution using CircleCI
tadashi0713
0
290
Speed matters: Advanced CI/CD techniques to improve development velocity, quality & security
tadashi0713
0
350
AWS Graviton 環境への CI _ CD パイプラインを CircleCI で実現しよう (AWS Fargate 編)
tadashi0713
0
410
10x deployment frequency using GitLab Flow and GitHub Actions on AWS ECS
tadashi0713
0
650
デプロイ頻度を10倍にした、ブランチ戦略とGitHub Actions on AWS ECS
tadashi0713
8
4.6k
Creating parallelized Android UITest (Appium) environment using Azure, Docker and Android emulator
tadashi0713
0
4.3k
Other Decks in Programming
See All in Programming
AI Engineeringは、AIプロダクトだけのものか? 〜AIがソフトウェアを作る時代の新しい当たり前〜 / No AI in your product. AI Engineering in your development.
rkaga
4
420
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
230
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
920
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
550
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
650
What's New in Android 2026
veronikapj
0
260
琵琶湖の水は止められてもNet--HTTPのリトライは止められない / You might be able to stop the water flow of Lake Biwa but you can't stop Net::HTTP retries
luccafort
PRO
0
700
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
270
そこに3びきプロダクトがいるじゃろう——生成AI時代における“価値が届かない理由”の構造
kosuket
0
480
楽しそうなつよつよエンジニアと目が死んでる僕/A brilliant engineer having a blast, and dead-eyed me.
3l4l5
2
180
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
870
torikago - Ruby::Boxで照らすモジュラモノリスの実行境界
se4weed
1
370
Featured
See All Featured
What does AI have to do with Human Rights?
axbom
PRO
1
2.3k
4 Signs Your Business is Dying
shpigford
187
22k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
990
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
So, you think you're a good person
axbom
PRO
2
2.1k
The SEO identity crisis: Don't let AI make you average
varn
0
530
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Building Applications with DynamoDB
mza
96
7.2k
How STYLIGHT went responsive
nonsquared
100
6.2k
エンジニアに許された特別な時間の終わり
watany
108
250k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
300
Transcript
退屈なブラウザ作業を puppeteerにやらせたいお話 SRE-SET Automation Night #2 Tadashi Nemoto
自己紹介 • 根本 征 (github: tadashi0713) • Since 2016 as
new graduate • QA-SET(Software Engineer in Test) team at Mercari • Automation Engineer • Web・Mobile テスト自動化(UI・End to End) • Continuous Integration (Jenkins, CircleCI, Bitrise) • 社内業務自動化・効率化 • ノンプログラマー向けに自動化の勉強会開催
None
None
自己紹介 • 社内の面倒な手作業はZapierにやらせようーーノンプログラ マーでも業務自動化ができるツールを導入してみて • 退屈なブラウザ作業はSeleniumにやらせようーーはじめてで もできるブラウザ操作自動化
意外と多い、ブラウザを使った繰り返し作業 • CSVなどのファイルをWebサイトからダウンロード • Webサービスのアカウントを発行 • Webサイトをスクリーンショット・チームに共有 • 同じ内容のフォームを定期的に入力する •
Google Spreadsheet • APIが提供されていないものも多い • 特にコーポレート部門(総務、人事など)に多くなりがち
Selenium Webdriverを使って自動化 • ruby + Selenium Webdriver + Chrome •
実行環境にCircleCIを使用 • circleci/ruby-node-browsersを使えばブラウザ・仮想ディ スプレイなどが既に入っている • REST API (Slack commandなどと連携) • cron (CircleCI 2.0のworkflow) • 10個以上の自動化が動いている
別にSelenium Webdriverじゃなくていい • 複数ブラウザでやらなくていい • Firefox Selenium IDEのような便利なツールが見当たらない • ≠
Chrome Selenium IDE • ノンプログラマーにはこういうのがあるといい • 環境構築がめんどくさい • スクリプト作るのも結構めんどくさい • セレクターを見つけて、スクリプト書いて見て、デバッグ
理想! • Chromeで実行できる • Selenium IDEみたいに簡単にスクリプトが作れるツール • スクリプトが拡張しやすい(Slack、Google、他API) • サーバーレスに実行できる
• AWS Lambda • API Gateway, CloudWatch(cron)連携できると便利
GoogleChrome/puppeteer Node.jsからChromeを簡単に扱える
Browserless Debugger https://chrome.browserless.io
Download Code
理想! • Chromeで実行できる • Selenium IDEみたいに簡単にスクリプトが作れるツール • スクリプトが拡張しやすい(Slack、Google、他API) • サーバーレスに実行できる
• AWS Lambda • API Gateway, CloudWatch(cron)連携できると便利 試行錯誤中
ご静聴ありがとうございました ※用法・用量を守って正しくお使いください