mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
27 lines
651 B
JavaScript
27 lines
651 B
JavaScript
const dynamicSection = {
|
|
selector: '.',
|
|
commands: [{
|
|
create ({ name, locateStrategy, selector, elements, sections, commands }) {
|
|
const Section = this.constructor;
|
|
|
|
const options = Object.assign(Object.create(this), {
|
|
name,
|
|
locateStrategy,
|
|
elements,
|
|
selector,
|
|
sections,
|
|
commands
|
|
});
|
|
|
|
options.elements.self = {
|
|
locateStrategy: 'xpath',
|
|
selector: '.'
|
|
};
|
|
|
|
return new Section(options);
|
|
}
|
|
}]
|
|
};
|
|
|
|
module.exports = dynamicSection;
|