What needs to be done:
- Remove all locators from Page Objects
this.exampleLocator = by.css('.unique-class');
needs to be changed to:
this.exampleLocator = $('.unique-class');
- Remove headers
| element | value |
from all steps
And there are "equal 1" following elements for element "rows":
| element | value |
| firstName | t:John |
| lastName | t:Doe |
needs to be changed to:
And there are "equal 1" following elements for element "rows":
| firstName | t:John |
| lastName | t:Doe |
- Delete
isExternal
from all Page Objects, if you are using Angular application
class ExamplePage extends BasePage {
constructor() {
super();
this.isExternal = true;
this.url = '/';
this.selector = $('.some-class');
}
needs to be changed to:
class ExamplePage extends BasePage {
constructor() {
super();
this.url = '/';
this.selector = $('.some-class');
}
- Change
exports
in Page Objects: The last line in each of the page objects
module.exports = new ExamplePage();
needs to be changed to:
module.exports = ExamplePage;
- Change
dictionaries
, example:
const { dictionaries } = require('kakunin');
class TestDictionary {
constructor() {
this.values = {
'test-name': 'Janek',
'test-value': 'lux'
};
this.name = 'test-dictionary';
}
isSatisfiedBy(name) {
return this.name === name;
}
getMappedValue(key) {
return this.values[key];
}
}
dictionaries.addDictionary(new TestDictionary());
needs to be changed to:
const { dictionaries } = require('kakunin');
const { BaseDictionary } = require('kakunin');
class TestDictionary extends BaseDictionary {
constructor() {
super('test-dictionary', {
'test-name': 'Janek',
'test-value': 'lux'
});
}
}
dictionaries.addDictionary(new TestDictionary());