mardi 28 avril 2015

How to change URL in protractor

I'm wondering how do you change the current URL upon pressing some button or link.

browser.waitForAngular();
expect(browser.driver.getCurrentUrl()).to.eventually.match(/document/).and.notify(callback);

I know this code will get the url and match it with document, I would like to set the URL upon a click.

e.g. I'm on Facebook and I want to go to profile, I click Profile button but want to update the URL by parsing a string value to it rather than a class/function

As I have a piece of code that doesn't have any classes to point to, the only thing I have is a href which contains the path location to the page.

Aucun commentaire:

Enregistrer un commentaire