2019-03-19 16:38:52 +02:00
|
|
|
# ${docGenStepName}
|
2018-10-04 17:06:42 +02:00
|
|
|
|
2019-03-19 16:38:52 +02:00
|
|
|
## ${docGenDescription}
|
2018-10-05 16:10:26 +02:00
|
|
|
|
2018-10-04 17:06:42 +02:00
|
|
|
## Prerequisites
|
|
|
|
|
|
|
|
none
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
```groovy
|
|
|
|
seleniumExecuteTests (script: this) {
|
2019-11-11 18:40:23 +02:00
|
|
|
git url: 'https://github.com/xxxxx/WebDriverIOTest.git'
|
2018-10-04 17:06:42 +02:00
|
|
|
sh '''npm install
|
|
|
|
node index.js'''
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Example test using WebdriverIO
|
|
|
|
|
2019-05-16 10:46:13 +02:00
|
|
|
Example based on <http://webdriver.io/guide/getstarted/modes.html> and <http://webdriver.io/guide.html>
|
2018-10-04 17:06:42 +02:00
|
|
|
|
|
|
|
#### Configuration for Local Docker Environment
|
2018-11-06 14:50:09 +02:00
|
|
|
|
|
|
|
```js
|
2018-10-04 17:06:42 +02:00
|
|
|
var webdriverio = require('webdriverio');
|
|
|
|
var options = {
|
|
|
|
host: 'selenium',
|
|
|
|
port: 4444,
|
|
|
|
desiredCapabilities: {
|
|
|
|
browserName: 'chrome'
|
|
|
|
}
|
|
|
|
};
|
|
|
|
```
|
2018-11-06 14:50:09 +02:00
|
|
|
|
2018-10-04 17:06:42 +02:00
|
|
|
#### Configuration for Kubernetes Environment
|
2018-11-06 14:50:09 +02:00
|
|
|
|
|
|
|
```js
|
2018-10-04 17:06:42 +02:00
|
|
|
var webdriverio = require('webdriverio');
|
|
|
|
var options = {
|
|
|
|
host: 'localhost',
|
|
|
|
port: 4444,
|
|
|
|
desiredCapabilities: {
|
|
|
|
browserName: 'chrome'
|
|
|
|
}
|
|
|
|
};
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Test Code (index.js)
|
|
|
|
|
2018-11-06 14:50:09 +02:00
|
|
|
```js
|
2018-10-04 17:06:42 +02:00
|
|
|
// ToDo: add configuration from above
|
|
|
|
|
|
|
|
webdriverio
|
|
|
|
.remote(options)
|
|
|
|
.init()
|
|
|
|
.url('http://www.google.com')
|
|
|
|
.getTitle().then(function(title) {
|
|
|
|
console.log('Title was: ' + title);
|
|
|
|
})
|
|
|
|
.end()
|
|
|
|
.catch(function(err) {
|
|
|
|
console.log(err);
|
|
|
|
});
|
|
|
|
```
|
|
|
|
|
2019-03-19 16:38:52 +02:00
|
|
|
## ${docGenParameters}
|
|
|
|
|
|
|
|
## ${docGenConfiguration}
|
2018-10-04 17:06:42 +02:00
|
|
|
|
2019-05-24 15:44:31 +02:00
|
|
|
## ${docJenkinsPluginDependencies}
|
2019-05-24 15:41:49 +02:00
|
|
|
|
2018-10-04 17:06:42 +02:00
|
|
|
## Side effects
|
2018-11-06 14:50:09 +02:00
|
|
|
|
2018-10-04 17:06:42 +02:00
|
|
|
none
|
|
|
|
|
|
|
|
## Exceptions
|
2018-11-06 14:50:09 +02:00
|
|
|
|
2018-10-04 17:06:42 +02:00
|
|
|
none
|