0

I could use some help in order to change an API call when testing my web site with Nightwatch or Protractor.

Using one of these frameworks with an active selenium server running, I can call

browser.url(Url to site);

When the site loads/opens, it will on the first page, make an API call to the server, to get a list of bookings for the current user logged in.

I want to catch this call, and tell it to use another Url (my json server) which returns bookings in the json format.

It's not possible for me, to make any code changes to the application, so I'm looking for some kind of proxy I can use in the actually tests.

What I use:

  • Nightwatch with selenium
  • Have also tried Protractor with selenium
  • The application is build with angular2

Does any know if it's possible to change the url in the actually call to the api?

Hope someone can help.

Mandersen
  • 805
  • 3
  • 14
  • 22

0 Answers0