Monday, 15 May 2017

TypeError: Cannot read property 'sleep' of undefined

Webdriver code which is giving the error - TypeError: Cannot read property 'sleep' of undefined

browser.init(desired, function() {
  browser.get("myurl")**.sleep(100000)**;
    browser.title(function(err, title) {
      browser.elementById('userid', function(err, el) {
        el.sendKeys("admin", function() {
          browser.elementById('pwd', function(err,el) {
            el.sendKeys("admin", function() {
                browser.elementById('sign-in-btn', function(err,el) {
                    el.click(function() {
                        browser.quit();
                    })
                })
            })
          })
        })
      })
    })
  });



via Monika Gambhir

No comments:

Post a Comment