logoutPage.js 921 B

12345678910111213141516171819202122232425262728293031323334
  1. module.exports = {
  2. url: function () {
  3. return this.api.launchUrl + 'admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete';
  4. },
  5. commands:
  6. [
  7. {
  8. userOpensProfile: async function () {
  9. await this.useXpath()
  10. .waitForElementVisible('@userProfileDropdown')
  11. .click('@userProfileDropdown')
  12. return this.useCss();
  13. },
  14. userLogsOut: function () {
  15. return this.waitForElementVisible('@logoutButton')
  16. .click('@logoutButton');
  17. }
  18. }
  19. ],
  20. elements: {
  21. logoutButton: {
  22. selector: '.pull-right'
  23. },
  24. userProfileDropdown: {
  25. selector: '//div[@id="topmenu-login-dropdown"]',
  26. locateStrategy: 'xpath'
  27. }
  28. }
  29. };