SlideShare a Scribd company logo
node-webkit
&
chrome-remote-interface
ユーザーフレンドリーなブラウザオートメーションツールを
Node.jsで書ぃて激モテするゃりかた
ぁゃぴ(@upgrade_ayp)
ブログ「ayapi.github.io」http://ayapi.github.io/
ブログ「ギャルでもゎかる自作pc」http://ameblo.jp/upgrade-ayp/
毎日ぉなじこと or 大量のデータを手入力の仕事でも…、
ノンプログラマーゎ、
自動化するってゅー発想が、ぁんまりなぃ
それを自動化してぁげると、
プログラマーゎ、激モテできる↑↑
ノンプログラマーにモテる努力
ブラウザ㊤での事務作業って、なにげぁる
【テキトーな例】
・CMSの設定変更
・ネットバンキングの操作
・ネットショップの商品/顧客情報の管理
ブラウザオートメーションが、大活躍\(^o^)/
ブラウザオートメーション
デスクトップアプリケーション ってゅーか
GUIツール?が、かんたんに作れる
GUI:   JS+CSS+HTML
ロジック: Node.js
WinでもMacでも、Node.jsが入ってなぃ環境でも、
実行ファイルを起動するだけで動く
ゃばぃ\(^o^)/ まじハッピー
node-webkitってなに
・ ユーザーにゎかりゃすぃ見た目を自由に作れる
GUIだけじゃなくて、
自動操作㊥のブラウザをリアルタイムでみせれるとこもgood♡
・ Same Origin Policyとかセキュリティの制約が少なぃ
JSのinjectもかなりかんたん↑↑
・ npmモジュールを自由に使ぇる
実行結果とか途中の処理を書くとき、
たくさんのライブラリの恩恵を受けれる\(^o^)/
とにかく、自由さが売り\(^o^)/
ブラウザオートメーションにぉける
node-webkitの優位性
■Node.js完結系(jsdom+httpRequestとか)
CUI、黒ぃ画面系
ぃまどんな操作をしてるのかをユーザーにみせるのが、むずぃ
■Chrome Extension(Chrome拡張機能)
学習コスト高ぃ(特にセキュリティの制約とかハマりポイント多ぃ)
■Selenium系(Nightwatch.jsとかも)
そも②これゎ「自動総合テスト」
「自動タスク」とゎ似てる部分も多ぃけど、
目的がちがぅ違和感とか、たりなぃ部分が、ぁる
ほかの技術
$(element).click();とか
(window.onbeforeunload)
↓
HTTPリクエスト送信
↓
HTTPレスポンスヘッダ受信
開始(window.onunload)
↓
HTTPレスポンスヘッダ受信完了
↓
HTTPレスポンスボディ受信完了
↓
DOMContentLoaded
エラー判定したぃタイミング
・レスポンスヘッダ受信完了時
 Status:200以外ならエラー、とか
・ブラウザタイムアウト時
 けどStatus:200だったなら無視して次へ、とか
・DOMContentLoaded発火時
 DOMにエラーテキストが含まれてたら、とか
Selenium系でゎ、
「Eとゅー要素が文書に現れるまで待って、 N秒超ぇ
たらエラー」とか、タイムアウトを併用しての文書の
内容にょる判定しかできなぃっぽぃ たぶん
node-webkitも単体だと、きびしぃ
同期遷移の状態判定
ChromeのDevToolsでみれるょーな情報を取得できるAPI
これが、node-webkitのChromiumでも、っかぇる♡
↑こんな赤ぃエラーも、kwsk取得できる
Chrome Remote Debugging Protocol
Chrome Remote Debugging Protocolを
Node.jsで書きゃすくしてくれるライブラリ
同期遷移での
DOMContentLoaded以
前の状態遷移も、
ぃろ②イベントをemitして
くれるから、
かんたんだし\(^o^)/
HTTPヘッダーも取れるしー
天才じゃんー↑
chrome-remote-interface
node-webkit & chrome-remote-interface
+
その他
andris9/inbox…IMAP用ライブラリ
確認メールが飛ぶょーなタスクで IMAPでメールを受信して次のタスクへ、とか♡
node-bunyan…Loggerライブラリ
GUIにログを表示するのもかんたん\ (^o^)/
フローコントロール
caolan/async、medikoo/deferred
npm install で入れちゃぇる
jQuery、Lo-dash、Backbone
組み合ゎせでぉすすめのnpmモジュール
GUI側(Backbone.View) ジョブの例
ためしてみてくださぃ↑↑
(ツッコミ||質問)大歓迎です♡
ぁゃぴ(@upgrade_ayp)

More Related Content

Recently uploaded (9)

ドメインモデリング基本編①~全体の流れ2025_02_27社内向け開催.pptx
ドメインモデリング基本編①~全体の流れ2025_02_27社内向け開催.pptxドメインモデリング基本編①~全体の流れ2025_02_27社内向け開催.pptx
ドメインモデリング基本編①~全体の流れ2025_02_27社内向け開催.pptx
ssuserfcafd1
 
IchiiRikisuke_理学療法士間の知識共有に向けた臨床推論テキストの構造化に関する研究.pdf
IchiiRikisuke_理学療法士間の知識共有に向けた臨床推論テキストの構造化に関する研究.pdfIchiiRikisuke_理学療法士間の知識共有に向けた臨床推論テキストの構造化に関する研究.pdf
IchiiRikisuke_理学療法士間の知識共有に向けた臨床推論テキストの構造化に関する研究.pdf
Matsushita Laboratory
 
20250222_neko_IoTLT_vol10_kitazaki_v1.pdf
20250222_neko_IoTLT_vol10_kitazaki_v1.pdf20250222_neko_IoTLT_vol10_kitazaki_v1.pdf
20250222_neko_IoTLT_vol10_kitazaki_v1.pdf
Ayachika Kitazaki
 
ElasticsearchでSPLADEする [Search Engineering Tech Talk 2025 Winter]
ElasticsearchでSPLADEする [Search Engineering Tech Talk 2025 Winter]ElasticsearchでSPLADEする [Search Engineering Tech Talk 2025 Winter]
ElasticsearchでSPLADEする [Search Engineering Tech Talk 2025 Winter]
kota usuha
 
IoT Devices Compliant with JC-STAR Using Linux as a Container OS
IoT Devices Compliant with JC-STAR Using Linux as a Container OSIoT Devices Compliant with JC-STAR Using Linux as a Container OS
IoT Devices Compliant with JC-STAR Using Linux as a Container OS
Tomohiro Saneyoshi
 
【修士論文】競輪における注目レース選定とLLMを用いたレース紹介記事生成に関する研究
【修士論文】競輪における注目レース選定とLLMを用いたレース紹介記事生成に関する研究【修士論文】競輪における注目レース選定とLLMを用いたレース紹介記事生成に関する研究
【修士論文】競輪における注目レース選定とLLMを用いたレース紹介記事生成に関する研究
harmonylab
 
【修士論文】帝国議会および国会議事速記録における可能表現の長期的変遷に関する研究
【修士論文】帝国議会および国会議事速記録における可能表現の長期的変遷に関する研究【修士論文】帝国議会および国会議事速記録における可能表現の長期的変遷に関する研究
【修士論文】帝国議会および国会議事速記録における可能表現の長期的変遷に関する研究
harmonylab
 
PostgreSQL最新動向 ~カラムナストアから生成AI連携まで~ (Open Source Conference 2025 Tokyo/Spring ...
PostgreSQL最新動向 ~カラムナストアから生成AI連携まで~ (Open Source Conference 2025 Tokyo/Spring ...PostgreSQL最新動向 ~カラムナストアから生成AI連携まで~ (Open Source Conference 2025 Tokyo/Spring ...
PostgreSQL最新動向 ~カラムナストアから生成AI連携まで~ (Open Source Conference 2025 Tokyo/Spring ...
NTT DATA Technology & Innovation
 
Apache Sparkに対するKubernetesのNUMAノードを意識したリソース割り当ての性能効果 (Open Source Conference ...
Apache Sparkに対するKubernetesのNUMAノードを意識したリソース割り当ての性能効果 (Open Source Conference ...Apache Sparkに対するKubernetesのNUMAノードを意識したリソース割り当ての性能効果 (Open Source Conference ...
Apache Sparkに対するKubernetesのNUMAノードを意識したリソース割り当ての性能効果 (Open Source Conference ...
NTT DATA Technology & Innovation
 
ドメインモデリング基本編①~全体の流れ2025_02_27社内向け開催.pptx
ドメインモデリング基本編①~全体の流れ2025_02_27社内向け開催.pptxドメインモデリング基本編①~全体の流れ2025_02_27社内向け開催.pptx
ドメインモデリング基本編①~全体の流れ2025_02_27社内向け開催.pptx
ssuserfcafd1
 
IchiiRikisuke_理学療法士間の知識共有に向けた臨床推論テキストの構造化に関する研究.pdf
IchiiRikisuke_理学療法士間の知識共有に向けた臨床推論テキストの構造化に関する研究.pdfIchiiRikisuke_理学療法士間の知識共有に向けた臨床推論テキストの構造化に関する研究.pdf
IchiiRikisuke_理学療法士間の知識共有に向けた臨床推論テキストの構造化に関する研究.pdf
Matsushita Laboratory
 
20250222_neko_IoTLT_vol10_kitazaki_v1.pdf
20250222_neko_IoTLT_vol10_kitazaki_v1.pdf20250222_neko_IoTLT_vol10_kitazaki_v1.pdf
20250222_neko_IoTLT_vol10_kitazaki_v1.pdf
Ayachika Kitazaki
 
ElasticsearchでSPLADEする [Search Engineering Tech Talk 2025 Winter]
ElasticsearchでSPLADEする [Search Engineering Tech Talk 2025 Winter]ElasticsearchでSPLADEする [Search Engineering Tech Talk 2025 Winter]
ElasticsearchでSPLADEする [Search Engineering Tech Talk 2025 Winter]
kota usuha
 
IoT Devices Compliant with JC-STAR Using Linux as a Container OS
IoT Devices Compliant with JC-STAR Using Linux as a Container OSIoT Devices Compliant with JC-STAR Using Linux as a Container OS
IoT Devices Compliant with JC-STAR Using Linux as a Container OS
Tomohiro Saneyoshi
 
【修士論文】競輪における注目レース選定とLLMを用いたレース紹介記事生成に関する研究
【修士論文】競輪における注目レース選定とLLMを用いたレース紹介記事生成に関する研究【修士論文】競輪における注目レース選定とLLMを用いたレース紹介記事生成に関する研究
【修士論文】競輪における注目レース選定とLLMを用いたレース紹介記事生成に関する研究
harmonylab
 
【修士論文】帝国議会および国会議事速記録における可能表現の長期的変遷に関する研究
【修士論文】帝国議会および国会議事速記録における可能表現の長期的変遷に関する研究【修士論文】帝国議会および国会議事速記録における可能表現の長期的変遷に関する研究
【修士論文】帝国議会および国会議事速記録における可能表現の長期的変遷に関する研究
harmonylab
 
PostgreSQL最新動向 ~カラムナストアから生成AI連携まで~ (Open Source Conference 2025 Tokyo/Spring ...
PostgreSQL最新動向 ~カラムナストアから生成AI連携まで~ (Open Source Conference 2025 Tokyo/Spring ...PostgreSQL最新動向 ~カラムナストアから生成AI連携まで~ (Open Source Conference 2025 Tokyo/Spring ...
PostgreSQL最新動向 ~カラムナストアから生成AI連携まで~ (Open Source Conference 2025 Tokyo/Spring ...
NTT DATA Technology & Innovation
 
Apache Sparkに対するKubernetesのNUMAノードを意識したリソース割り当ての性能効果 (Open Source Conference ...
Apache Sparkに対するKubernetesのNUMAノードを意識したリソース割り当ての性能効果 (Open Source Conference ...Apache Sparkに対するKubernetesのNUMAノードを意識したリソース割り当ての性能効果 (Open Source Conference ...
Apache Sparkに対するKubernetesのNUMAノードを意識したリソース割り当ての性能効果 (Open Source Conference ...
NTT DATA Technology & Innovation
 

Featured (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
 

node-webkit & chrome-remote-interfaceでブラウザオートメーション