Hoppa till huvudinnehåll

winappdriver Service

wdio-winappdriver-service är ett tredjepartspaket, för mer information se GitHub | npm

Denna tjänst hjälper dig att köra WinAppDriver-servern sömlöst när du kör tester med WDIO testrunner. Den startar WinAppDriver i en underprocess.

Installation

npm install wdio-winappdriver-service --save-dev

Instruktioner om hur man installerar WebdriverIO finns här.

Konfiguration

För att använda tjänsten behöver du lägga till winappdriver i din tjänstearray:

// wdio.conf.js
export.config = {
// ...
services: ['winappdriver'],
// ...
};

Alternativ

Följande alternativ kan läggas till i wdio.conf.js-filen. För att definiera alternativ för tjänsten behöver du lägga till tjänsten i services-listan på följande sätt:

// wdio.conf.js
export.config = {
// ...
services: [
['winappdriver', {
// WinAppDriver service options here
// ...
}]
],
// ...
};

logPath

Sökväg där alla loggar från winappdriver-servern ska lagras.

Typ: String

Exempel:

export.config = {
// ...
services: [
['winappdriver', {
logPath : './'
}]
],
// ...
}

command

För att använda din egen installation av WinAppDriver, t.ex. globalt installerad, ange kommandot som ska startas.

Typ: String

Exempel:

export.config = {
// ...
services: [
['winappdriver', {
command : 'c:\\Program Files (x86)\\Windows Application Driver\\WinAppDriver.exe'
}]
],
// ...
}

args

Lista över argument som skickas direkt till WinAppDriver.

Se dokumentationen för möjliga argument.

Typ: Array

Standard: []

Exempel:

export.config = {
// ...
services: [
['winappdriver', {
args: ['10.0.0.10', '4723/wd/hub']
}]
],
// ...
}

Welcome! How can I help?

WebdriverIO AI Copilot