Advertisement
dmimaz

Untitled

Jun 20th, 2019
101
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const assert = require('assert');
  2.  
  3. describe('Desktop login', () => {
  4.     it('Retail login', async () => {
  5.         await browser.setWindowSize(1024, 768);
  6.         await browser.url('https://gepur.com');
  7.         const loginButton = await $('a.h-account');
  8.         await loginButton.click();
  9.         const email = await $('id=loginform-email');
  10.         email.setValue('login');
  11.         const password = await $('id=loginform-password');
  12.         password.setValue('password');
  13.         browser.debug();
  14.         const submitButton = await $('button.btn-basik.btn-sm.btn-black');
  15.         await browser.pause(500);
  16.         await submitButton.click();
  17.         await browser.pause(200);
  18.         let url1 = await driver.getUrl()
  19.         await browser.pause(200);
  20.         await assert.equal(url1, 'https://gepur.com/');
  21.         await browser.closeWindow();
  22.     });
  23.  
  24.     it('Wholesale login', async () => {
  25.         await browser.newWindow('https://gepur.com/');
  26.         await browser.setWindowSize(1024, 768);
  27.         await browser.url('https://gepur.com');
  28.         const loginButton = await $('a.h-account');
  29.         await loginButton.click();
  30.         const email = await $('id=loginform-email');
  31.         email.setValue('login');
  32.         const password = await $('id=loginform-password');
  33.         password.setValue('pasword');
  34.         browser.debug();
  35.         const submitButton = await $('button.btn-basik.btn-sm.btn-black');
  36.         await browser.pause(500);
  37.         await submitButton.click();
  38.         await browser.pause(200);
  39.         let url1 = await driver.getUrl()
  40.         await browser.pause(200);
  41.         await assert.equal(url1, 'https://gepur.com/');
  42.         await browser.closeWindow();
  43.     });
  44. });
Advertisement
RAW Paste Data Copied
Advertisement