Nicole Phillips
Nicole Phillips

Reputation: 763

Using browser.get with different webpage urls are loading the wrong url first

I have a test that sends an email to mailinator from the baseurl defined in the config page. After the email is sent I then want to load mailinator to verify the email is there. What is happening however is protractor is loading www.mailinator.com instead of the baseurl.

I am calling mailinator like this below:

browser.get('www.mailinator.com');

Any idea how I can fix this? I browsed some stackoverflow pages however I haven't found one that directly relates to what I'm asking.

Thanks!

Upvotes: 1

Views: 125

Answers (1)

Piotroslav
Piotroslav

Reputation: 262

I am still not sure I got you right.

  1. Open website with

    browser.get('https://iplan.newmarketinc.com/');

  2. Proceed with your test
  3. At the point you need to verify if email was sent, go to mailinator with

    browser.get('www.mailinator.com');

Do the email verification. If you do not wish to leave your page on newmarketinc.com you can simply create new instance of webdriver for the purpose of getting to mailinator.

  1. Go back to your test execution

Upvotes: 1

Related Questions