Protractor: use the browser or browser.driver methods?

When used, a protractorglobal variable browserhas all the functions browser.driver.

I specifically ask about this because I'm not sure whether to use browser.waitor browser.driver.wait, since they both look the same, and I also saw that many methods browser.driverare available in browser(if not all).

So what is the recommended way to call these methods browser.methodor browser.driver.method?

+4
source share
2 answers

In theory, the difference is simple: if this is an Angular application under test, use a browser, otherwise browser.driver.


A bit more about the story:

WebDriverJS - senenium javascript - - selenium, WebDriverJS browser.driver.


, , :

+6

...

WebDriver Contractor. , sleep, wait getCurrentUrl, WebDriver (. browser.ts). browser browser.driver? , , .

...

. , get, - Protractor vs selenium-webdriver. Angular browser.get. Angular, , .

, protractortest.org/#/api, browser, Protractor " webdriver.WebDriver". , " webdriver.WebDriver", , browser browser.driver.

+4

Source: https://habr.com/ru/post/1664376/


All Articles