ywinappdriver 服務
這個服務可協助您在使用 WDIO 測試執行器執行測試時,順暢地執行 ywinappdriver 伺服器。它會在子進程中啟動 ywinappdriver。
安裝
npm install wdio-ywinappdriver-service --save-dev
關於如何安裝 WebdriverIO
的說明,請參閱 此處。
設定
為了使用此服務,您需要將 ywinappdriver
新增至您的服務陣列
// wdio.conf.js
export.config = {
// ...
services: ['ywinappdriver'],
// ...
};
選項
以下選項可以新增至 wdio.conf.js 檔案。若要定義此服務的選項,您需要以下列方式將此服務新增至 services
清單
// wdio.conf.js
export.config = {
// ...
services: [
['ywinappdriver', {
// ywinappdriver service options here
// ...
}]
],
// ...
};
logPath
應儲存 ywinappdriver 伺服器所有記錄的路徑。
類型:String
範例
export.config = {
// ...
services: [
['ywinappdriver', {
logPath : './'
}]
],
// ...
}
command
若要使用您自己安裝的 winappdriver(例如全域安裝),請指定應啟動的命令。
類型:String
範例
export.config = {
// ...
services: [
['ywinappdriver', {
command : 'c:\\xx\\ywinappdriver.exe'
}]
],
// ...
}
args
直接傳遞至 ywinappdriver
的引數清單。
請參閱 文件,以了解可能的引數。
類型:Array
預設:[]
範例
export.config = {
// ...
services: [
['ywinappdriver', {
args: ['--urls' 'http://127.0.0.1:4723' '--basepath' '/wd/hub']
}]
],
// ...
}