19

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!

1 Answer 1

36

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)

4
  • I see. Thank you very much for your reply. Could you please give a reference to say that is obsolete? (It does look that way, I just would like to have a confirmation. Thank you! =) )
    – Tim Hong
    Commented Aug 26, 2014 at 1:44
  • 3
    reference in protractor changelog.md 'browser is an instance of protractor. This was previously accessed using protractor.getInstance.'
    – nilsK
    Commented Aug 26, 2014 at 9:59
  • 1
    Thanks @nilsK for providing the reference! I updated the answer with it :) Commented Aug 26, 2014 at 17:05
  • 1
    reference to browser in Protractor API docs
    – greggmi
    Commented May 5, 2017 at 21:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.