Mocking and Stubbing with protractor

This blog post discusses advance usage scenarios for Protractor. In particular it covers the the little know addMockModule() method of the Protractor browser object. The method allows you to create angular modules in Protractor (i.e. mocks or stubs of your API module) and upload them to the browser to replace the real implementation within the … Read more

What are the differences between using Nightwatch.js vs Protractor

If you are working on an AngularJS project, the choice is simple – Protractor: it is being made specifically for angular apps (though it can be used for non-angular apps also) supports angular-specific locator strategies (like by.model, by.repeater etc) waits for angular to start up during the page load (sync) it is being actively maintained … Read more

Protractor browser.wait doesn’t wait

It is all about promises (actually every protractor question is about promises). browser.wait() is not a blocking call, it schedules a command to wait for a condition: Schedules a command to wait for a condition to hold, as defined by some user supplied function. If any errors occur while evaluating the wait, they will be … Read more

Protractor in STS IDE -> Could not find update-config.json

It looks like you are either using directConnect or launching with a local driver provider (not having seleniumAddress or directConnect) in your configuration file. You need to run webdriver-manager update. Previously I had extra flags to not download standalone or gecko with webdriver-manager update –standalone false –gecko false. This is no longer the case if … Read more

Protractor: Scroll down

You need to wait for the promise to be solved. The following example comes from an open issue browser.executeScript(‘window.scrollTo(0,0);’).then(function () { page.saveButton.click(); }) Update: This is an old question (May of 2014), but still it is getting some visitors. To clarify: window.scrollTo(0, 0) scrolls to the top left corner of the current page. If you … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)