WDIO is entering each characters on login screen very slowly when opened in IE 11

116 Views Asked by At

With the use of WDIO, I am trying to automate the login screen of an application developed in ReactJs & Node.js. It takes a pause of 4-5 seconds after entering each character. Because of this, a timeout happens before the "Sign In" button is clicked and I am getting the following error.

Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (E:\Jigs\WDIO_React\specs\loginReactIE.spec.js)

I am still fairly new in using WDIO and I am clueless about how this could be resolved.

I have the following devDependencies in package.json:

"devDependencies": {
    "@wdio/crossbrowsertesting-service": "^6.0.8",
    "@wdio/firefox-profile-service": "^6.0.7",
    "@wdio/local-runner": "^5.22.4",
    "@wdio/mocha-framework": "^5.18.7",
    "@wdio/selenium-standalone-service": "^6.0.8",
    "@wdio/spec-reporter": "^5.22.4",
    "@wdio/sync": "^5.20.1",
    "chai": "^4.2.0",
    "chromedriver": "^80.0.1",
    "geckodriver": "^1.19.1",
    "iedriver": "^3.14.1",
    "jasmine": "^3.5.0",
    "mocha": "^7.1.1",
    "selenium-standalone": "^6.17.0",
    "wdio-chromedriver-service": "^5.0.2",
    "wdio-geckodriver-service": "^1.0.3",
    "wdio-iedriver-service": "^0.1.0",
    "wdio-selenium-standalone-service": "0.0.12"
  }

The IE 11 version is 11.1098.17763.0 And it's 64-bit.

I read here https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver that I need to set a registry entry for IE11 and got it done. Still, I have no luck.

Could anybody please help me with how I could fix the slowness in entering the values on the login screen so that timeout could be avoided?

Here's my loginReactIE.page.js:

var expect = require("chai").expect;

class loginReactPageIE {
  // Locate ClientId
  get userName() {return $("input#email")}

  // Locate Password
  get password() {return $("input#password")}

  // Locate "Sign In" button
  get signIn() {return $("#login button.btn")}

  enterUsername(clientId) {
    expect(this.userName.isDisplayed()).to.equal(true);
    this.userName.addValue(clientId);
  }

  enterPassword(pw) {
    expect(this.password.isDisplayed()).to.equal(true);
    this.password.addValue(pw);
  }

  submit() {
    expect(this.signIn.isDisplayed()).to.equal(true);
    this.signIn.click();
  }
}
module.exports = new loginReactPageIE();

And here's loginReactIE.spec.js:

const loginReactPageIE = require("../pageobjects/loginReactIE.page");
const assert = require("assert");
var expect = require("chai").expect;

describe("Loign as client and check profile", function() {
  it("login is successful with valid credentials", function() {
    try {
      browser.url("/");
      browser.setWindowSize(1900, 1000);

      loginReactPageIE.enterUsername("jigs_test");      
      loginReactPageIE.enterPassword("TestPass1@");      
      loginReactPageIE.submit();
      done();
    } catch (error) {
      done(error);
    }
    browser.pause(30000);
  });
0

There are 0 best solutions below