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
230
Scalable and cloud-native mobile game CI/CD environment using Unity
tadashi0713
0
150
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
310
AWS Graviton 環境への CI _ CD パイプラインを CircleCI で実現しよう (AWS Fargate 編)
tadashi0713
0
370
10x deployment frequency using GitLab Flow and GitHub Actions on AWS ECS
tadashi0713
0
610
デプロイ頻度を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
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
530
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
140
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
11
5.2k
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
650
チームをチームにするEM
hitode909
0
440
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
120
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
620
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
3
780
Cap'n Webについて
yusukebe
0
160
GoLab2025 Recap
kuro_kurorrr
0
3.6k
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
10
1.5k
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.6k
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
Mind Mapping
helmedeiros
PRO
0
47
Making Projects Easy
brettharned
120
6.5k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
0
140
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
32
Done Done
chrislema
186
16k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
140
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
120
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)連携できると便利 試行錯誤中
ご静聴ありがとうございました ※用法・用量を守って正しくお使いください