0

How can I check if URL change after login to know that the login was success....

'use strict';

let I;

module.exports = {

  _init() {
   I = actor();
  },

   fields: {
    email: '[bo-email]',
    password: '[bo-password]'
  },
  submitButton:'button',

  sendForm(email, password,utills) {
    I.fillField(this.fields.email, email);
    I.fillField(this.fields.password, password);
    I.click(this.submitButton);
  //how to check if navigation was success...

Tnx!

Vitaly Menchikovsky
  • 4,692
  • 15
  • 48
  • 87

2 Answers2

3
I.seeInCurrentUrl("page=2");

This method is the only way you can check if there is a URL change and you need not bother about using a wait method because this method would not execute until there is a URL change. However, you would need to increase your method timeout, to accommodate the long wait probably because of bad internet access.

Gbenro Oni
  • 76
  • 7
0
I.seeInCurrentUrl('/register');

http://codecept.io/helpers/WebDriverIO/#seeincurrenturl

Bred
  • 11
  • 5