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.8k
退屈なブラウザ作業を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
220
Scalable and cloud-native mobile game CI/CD environment using Unity
tadashi0713
0
140
Migrating your mobile CI/CD environment to a scalable cloud solution using CircleCI
tadashi0713
0
240
Speed matters: Advanced CI/CD techniques to improve development velocity, quality & security
tadashi0713
0
300
AWS Graviton 環境への CI _ CD パイプラインを CircleCI で実現しよう (AWS Fargate 編)
tadashi0713
0
360
10x deployment frequency using GitLab Flow and GitHub Actions on AWS ECS
tadashi0713
0
600
デプロイ頻度を10倍にした、ブランチ戦略とGitHub Actions on AWS ECS
tadashi0713
8
4.4k
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
Tangible Code
chobishiba
3
520
AIのバカさ加減に怒る前にやっておくこと
blueeventhorizon
0
160
Functional Calisthenics in Kotlin: Kotlinで「関数型エクササイズ」を実践しよう
lagenorhynque
0
110
AIの弱点、やっぱりプログラミングは人間が(も)勉強しよう / YAPC AI and Programming
kishida
8
3.5k
業務でAIを使いたい話
hnw
0
260
自動テストのアーキテクチャとその理由ー大規模ゲーム開発の場合ー
segadevtech
2
940
「正規表現をつくる」をつくる / make "make regex"
makenowjust
1
120
CSC509 Lecture 11
javiergs
PRO
0
300
ノーコードからの脱出 -地獄のデスロード- / Escape from Base44
keisuke69
0
680
MCPサーバー「モディフィウス」で変更容易性の向上をスケールする / modifius
minodriven
7
1.4k
PyCon mini 東海 2025「個人ではじめるマルチAIエージェント入門 〜LangChain × LangGraphでアイデアを形にするステップ〜」
komofr
3
910
Flutterアプリ運用の現場で役立った監視Tips 5選
ostk0069
1
330
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
658
61k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Scaling GitHub
holman
463
140k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Why Our Code Smells
bkeepers
PRO
340
57k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
Typedesign – Prime Four
hannesfritz
42
2.9k
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)連携できると便利 試行錯誤中
ご静聴ありがとうございました ※用法・用量を守って正しくお使いください