Should I use browser or ptor = protractor.getInstance()?

Tim Hong picture Tim Hong · Aug 26, 2014 · Viewed 9.5k times · Source

I watched this video (https://www.youtube.com/watch?v=idb6hOxlyb8) which was uploaded Aug 2013. It claims that we should use

ptor.get(url)

rather than

browser().navigateTo(url)

in future. But when I look at docs on the protractor home page (on git hub) and their newest examples are still using browser.

I am wondering if any one knows the movement to use

var ptor = protractor.getInstance()

still happening?

Thank you very much in advance!

Answer

Leo Gallucci picture Leo Gallucci · Aug 26, 2014

Using ptor is obsolete, you should switch to browser from now on.

Regarding the modern way to navigate to a page, use: browser.get(url)

If is not an angular page then browser.driver.get(url)