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
1
1.9k
退屈なブラウザ作業をpuppeteerにやらせたいお話
SRE-SET Automation Night #2
https://mercari.connpass.com/event/79046/
Tadashi Nemoto
March 06, 2018
Tweet
Share
More Decks by Tadashi Nemoto
See All by Tadashi Nemoto
Best Practice CI/CD Pipeline for Deploying Container Apps to AWS
tadashi0713
0
250
Scalable and cloud-native mobile game CI/CD environment using Unity
tadashi0713
0
160
Migrating your mobile CI/CD environment to a scalable cloud solution using CircleCI
tadashi0713
0
260
Speed matters: Advanced CI/CD techniques to improve development velocity, quality & security
tadashi0713
0
310
AWS Graviton 環境への CI _ CD パイプラインを CircleCI で実現しよう (AWS Fargate 編)
tadashi0713
0
380
10x deployment frequency using GitLab Flow and GitHub Actions on AWS ECS
tadashi0713
0
620
デプロイ頻度を10倍にした、ブランチ戦略とGitHub Actions on AWS ECS
tadashi0713
8
4.5k
Creating parallelized Android UITest (Appium) environment using Azure, Docker and Android emulator
tadashi0713
0
4.2k
メルカリの開発スピードと品質を支える Selenium on Azure Kubernetes Service
tadashi0713
2
1.5k
Other Decks in Programming
See All in Programming
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
6
1.1k
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
8.3k
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
240
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.1k
エンジニアの「手元の自動化」を加速するn8n 2026.02.27
symy2co
0
180
Migration to Signals, Signal Forms, Resource API, and NgRx Signal Store @Angular Days 03/2026 Munich
manfredsteyer
PRO
0
130
Windows on Ryzen and I
seosoft
0
350
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
150
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
230
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
2
300
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
150
Fundamentals of Software Engineering In the Age of AI
therealdanvega
2
290
Featured
See All Featured
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
120
Code Review Best Practice
trishagee
74
20k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
92
Designing for Performance
lara
611
70k
Six Lessons from altMBA
skipperchong
29
4.2k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
89
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
How STYLIGHT went responsive
nonsquared
100
6k
A designer walks into a library…
pauljervisheath
210
24k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
340
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
150
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
650
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)連携できると便利 試行錯誤中
ご静聴ありがとうございました ※用法・用量を守って正しくお使いください