Address
:
[go:
up one dir
,
main page
]
Include Form
Remove Scripts
Accept Cookies
Show Images
Show Referer
Rotate13
Base64
Strip Meta
Strip Title
Session Cookies
More Web Proxy on the site http://driver.im/
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
Electron + WebDriver = Spectron
Search
Linda_pp
June 09, 2016
Technology
1
1.8k
Electron + WebDriver = Spectron
Introduction to Spectron; a E2E testing framework for Electron apps
Linda_pp
June 09, 2016
Tweet
Share
More Decks by Linda_pp
See All by Linda_pp
actionlint の Linter 設計
rhysd
6
4k
ripgrep をライブラリとして使う
rhysd
0
420
port-monolith-to-wasm-for-chrome-extension
rhysd
0
460
Fuzzing Rust Text Editor
rhysd
1
2.9k
Vim compiled to WebAssembly
rhysd
5
2.1k
about-neovim-0.4.0-floating-window
rhysd
3
2.2k
reply.vim
rhysd
0
1.2k
Vim ported to WebAssembly (VimConf 2018)
rhysd
4
3.3k
go-selfupdate-github で ツールを自己アップデートする
rhysd
5
4.3k
Other Decks in Technology
See All in Technology
知っててうれしい HTTP Cookie を使ったセッション管理について
greendrop
1
110
Oracle Exadata Database Service(Dedicated Infrastructure):サービス概要のご紹介
oracle4engineer
PRO
0
11k
エンジニアリングマネージャー視点での、自律的なスケーリングを実現するFASTという選択肢 / RSGT2025
yoshikiiida
4
2.7k
12 Days of OpenAIから読み解く、生成AI 2025年のトレンド
shunsukeono_am
0
1k
React Routerで実現する型安全なSPAルーティング
sansantech
PRO
4
870
PHP ユーザのための OpenTelemetry 入門 / phpcon2024-opentelemetry
shin1x1
3
1.6k
Opcodeを読んでいたら何故かphp-srcを読んでいた話
murashotaro
0
360
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
1
5k
Fabric 移行時の躓きポイントと対応策
ohata_ds
1
120
Visual StudioとかIDE関連小ネタ話
kosmosebi
1
260
C++26 エラー性動作
faithandbrave
2
870
UI State設計とテスト方針
rmakiyama
4
940
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Making the Leap to Tech Lead
cromwellryan
133
9k
GitHub's CSS Performance
jonrohan
1030
460k
A Philosophy of Restraint
colly
203
16k
Adopting Sorbet at Scale
ufuk
74
9.1k
Building Adaptive Systems
keathley
38
2.3k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
850
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
The Cost Of JavaScript in 2023
addyosmani
46
7.1k
Raft: Consensus for Rubyists
vanstee
137
6.7k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Transcript
&MFDUSPO 8FC%SJWFS 4QFDUSPO .PEFSO8FC"QQ-5 @Linda_pp @rhysd
&MFDUSPO w σεΫτοϓΞϓϦϑϨʔϜϫʔΫGSPN(JU)VC w $ISPNJVNϕʔε /PEFKT
&MFDUSPOΞϓϦ։ൃ༻ΞϓϦ 4QFDUSPO &OEUP&OEςετ ༻ͷςεςΟϯάɹ ϑϨʔϜϫʔΫ $ISPNFESJWFS XFCESJWFSJP %FWUSPO *1$ΠϕϯτΛ
ࢹͰ͖Δ%FW5PPMT ֦ு "1*%FNP"QQ &MFDUSPOͷ֤छ"1* ΛࢼͤΔσϞΞϓϦ
&MFDUSPOΞϓϦ։ൃ༻ΞϓϦ 4QFDUSPO &OEUP&OEςετ ༻ͷςεςΟϯάɹ ϑϨʔϜϫʔΫ $ISPNFESJWFS XFCESJWFSJP %FWUSPO *1$ΠϕϯτΛ
ࢹͰ͖Δ %FW5PPMT֦ு "1*%FNP"QQ &MFDUSPOͷ֤छ"1* ΛࢼͤΔσϞΞϓϦ
&MFDUSPOΞϓϦͷςετ w ୯ମςετʢ&MFDUSPO"1*ͷґଘແ͠ʣ w ϩʔΧϧͷ/PEFKTͰςετʢ߹ʹΑͬͯ KTEPNʣ w ୯ମςετʢ&MFDUSPO"1*ͷґଘ༗Γʣ w FMFDUSPONPDIBΛͬͯ&MFDUSPOͷϓϩηε্ͰςετΛΒͤΔ
w IUUQTHJUIVCDPNKQSJDIBSETPOFMFDUSPONPDIB w &OEUP&OEςετ w 4QFDUSPOΛ࣮ͬͯࡍͷΞϓϦΛಈ͔͢ w IUUQTHJUIVCDPNFMFDUSPOTQFDUSPO
σϞʂ w IUUQTHJUIVCDPNSIZTE:PVS'VLVSPV w πΠολʔΫϥΠΞϯτ w 5ZQF4DSJQU BWBKT BTZODBXBJU
4QFDUSPO w 4QFDUSPODISPNFESJWFS XFCESJWFSJP w DISPNFESJWFSͷηοτΞοϓΞϓϦଆͷ &MFDUSPO"1*Λୟͨ͘Ίͷϔϧύʔ w ΞϓϦͷQBUIΛࢦఆ͢Δ͚ͩͰ͙͢ςετ͕࢝Ί ΒΕΔ
w 5SBWJT$*"QQ7FZPSSFBEZ
XFCESJWFSJP w 4FMFOJVN8FC%SJWFSͷ+BWB4DSJQUόΠϯσΟϯ άɽ8FC%SJWFS"1*ܦ༝ͰϒϥβΛૢ࡞͢Δϥ ΠϒϥϦ w ඪ४ͷ+4όΠϯσΟϯάʹൺͯ؆ܿʹॻ͚Δ
&MFDUSPO $ISPNJVN 4QFDUSPO XFCESJWFSJP :PVS5FTU $PEF :PVS"QQ w DBQBCJMJUZࣗಈࢦఆ w
ESJWFSΦϒδΣΫ τ֦ு w 8FC%SJWFS"1* WJBDISPNFESJWFS w NPDIBBWBͳͲ Ͱςετ w &MFDUSPO"1*ͷϦ Ϟʔτ࣮ߦ
import test from 'ava'; import {Application} from 'spectron'; test.beforeEach(async t
=> { t.context.app = new Application({ path: '/Applications/MyApp.app/Contents/MacOS/MyApp' }); await t.context.app.start(); }); test.afterEach.always(async t => { await t.context.app.stop(); }); test(async t => { const app = t.context.app; const client = app.client; await client.waitUntilWindowLoaded(); // Electron API (BrowserWindow) const win = app.browserWindow; t.true(await win.isVisible()); // Operate app via WebDriver await client.element('#name-input').keys('my name'); await client.click('#submit-btn'); t.true(await client.waitForExist('#login-success')); });
FMFDUSPOQSFCVJMU ύοέʔδΛ͍͍ͨ࣌ import {Application} from 'spectron'; import * as electron
from 'electron-prebuilt'; test.beforeEach(async t => { t.context.app = new Application({ path: electron, args: ['/path/to/your/repository'], env: process.env, }); });
HPUP'"*- w ςετ͕GBJMͨ͠ͱ͖ w NBJOϓϩηεSFOEFSFSϓϩηεͷϩάΛऩूͯ͠อ ଘ w DMJFOUHFU.BJO1SPDFTT-PHT w
DMJFOUHFU3FOEFS1SPDFTT-PHT w DMJFOUDBQUVSF1BHF ͰεΫϦʔϯγϣοτอଘ w DMJFOUTBWF1BHF Ͱϖʔδͷ)5.-ςΩετΛอଘ
ࠓͯ͠ͳ͍͜ͱ w ςετέʔεઃܭ w 1BHF0CKFDUύλʔϯʹΑΔ6*ૢ࡞ͷϥΠϒϥϦ Խ w ςετεΫϦϓτͷϝϯςφϯε w ༷มߋʹڧ͍&&ςετεΫϦϓτઃܭ
·ͱΊ w &MFDUSPOΞϓϦͷ&OEUP&OEςετ 4QFDUSPOͰ؆୯ʹͰ͖Δ @Linda_pp @rhysd