mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-14 11:03:09 +02:00
7177954e80
* generate docs for seleniumExecuteTests * inherit docs for uiVeri5ExecuteTests * add description for failOnError
78 lines
1.2 KiB
Markdown
78 lines
1.2 KiB
Markdown
# ${docGenStepName}
|
|
|
|
## ${docGenDescription}
|
|
|
|
## Prerequisites
|
|
|
|
none
|
|
|
|
## Example
|
|
|
|
```groovy
|
|
seleniumExecuteTests (script: this) {
|
|
git url: 'https://github.wdf.sap.corp/xxxxx/WebDriverIOTest.git'
|
|
sh '''npm install
|
|
node index.js'''
|
|
}
|
|
```
|
|
|
|
### Example test using WebdriverIO
|
|
|
|
Example based on http://webdriver.io/guide/getstarted/modes.html and http://webdriver.io/guide.html
|
|
|
|
#### Configuration for Local Docker Environment
|
|
|
|
```js
|
|
var webdriverio = require('webdriverio');
|
|
var options = {
|
|
host: 'selenium',
|
|
port: 4444,
|
|
desiredCapabilities: {
|
|
browserName: 'chrome'
|
|
}
|
|
};
|
|
```
|
|
|
|
#### Configuration for Kubernetes Environment
|
|
|
|
```js
|
|
var webdriverio = require('webdriverio');
|
|
var options = {
|
|
host: 'localhost',
|
|
port: 4444,
|
|
desiredCapabilities: {
|
|
browserName: 'chrome'
|
|
}
|
|
};
|
|
```
|
|
|
|
#### Test Code (index.js)
|
|
|
|
```js
|
|
// 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);
|
|
});
|
|
```
|
|
|
|
## ${docGenParameters}
|
|
|
|
## ${docGenConfiguration}
|
|
|
|
## Side effects
|
|
|
|
none
|
|
|
|
## Exceptions
|
|
|
|
none
|