UNPKG

nightwatch

Version:

Easy to use Node.js based end-to-end testing solution for web applications using the W3C WebDriver API.

41 lines (32 loc) 668 B
const searchCommands = { submit() { this.waitForElementVisible('@submitButton', 1000) .click('@submitButton'); this.pause(1000); return this; // Return page object for chaining } }; const consentModal = '[aria-modal="true"]'; module.exports = { url: 'https://google.no', commands: [ searchCommands ], sections: { consentModal: { selector: consentModal, elements: { rejectAllButton: '.GzLjMd button:nth-child(1)' } } }, elements: { consentModal, searchBar: { selector: 'textarea[name=q]' }, submitButton: { selector: 'input[value="Google Search"]' } } };