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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Tadashi Nemoto
March 06, 2018
Programming
1.9k
1
Share
退屈なブラウザ作業を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
71
Best Practice CI/CD Pipeline for Deploying Container Apps to AWS
tadashi0713
0
260
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
320
AWS Graviton 環境への CI _ CD パイプラインを CircleCI で実現しよう (AWS Fargate 編)
tadashi0713
0
390
10x deployment frequency using GitLab Flow and GitHub Actions on AWS ECS
tadashi0713
0
630
デプロイ頻度を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
Other Decks in Programming
See All in Programming
The Less-Told Story of Socket Timeouts
coe401_
3
630
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
150
The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths
serradura
0
350
UIの境界線をデザインする | React Tokyo #15 メイントーク
sasagar
2
380
Terraform言語の静的解析 / static analysis of Terraform language
wata727
1
110
SkillがSkillを生む:QA観点出しを自動化した
sontixyou
6
3.5k
JOAI2026 1st solution - heron0519 -
heron0519
0
150
決定論 vs 確率論:Gemini 3 FlashとTF-IDFを組み合わせた「法規判定エンジン」の構築
shukob
0
120
AI-DLC Deep Dive
yuukiyo
9
4.8k
属人化しないコード品質の作り方_2026.04.07.pdf
muraaano
0
240
「Linuxサーバー構築標準教科書」を読んでみた #ツナギメオフライン.7
akase244
0
1.4k
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
1
440
Featured
See All Featured
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
43k
Building AI with AI
inesmontani
PRO
1
920
Paper Plane
katiecoart
PRO
1
49k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
520
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.9k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Leo the Paperboy
mayatellez
7
1.7k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
170
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
500
Bash Introduction
62gerente
615
210k
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)連携できると便利 試行錯誤中
ご静聴ありがとうございました ※用法・用量を守って正しくお使いください