home.js 406 B

1234567891011121314151617
  1. var searchCommands = {
  2. submit: function() {
  3. this.waitForElementVisible('@submitButton', 3000)
  4. .click('@submitButton')
  5. .api.pause(1000);
  6. return this; // Return page object for chaining
  7. }
  8. };
  9. module.exports = {
  10. url: 'http://google.com',
  11. commands: [searchCommands],
  12. elements: {
  13. searchBar: { selector: 'input[name=q]' },
  14. submitButton: { selector: '[type=submit]' }
  15. }
  16. };