browser.driver vs browser. Which one to use?
See original GitHub issueCan someone please explain in plain English (or point to docs) on when I should use browser.driver
and when browser
when calling methods? For example:
browser.get() or browser.driver.get()?
browser.getAllWindowHandles() or browser.driver.getAllWindowHandles()?
browser.getCurrentUrl() or browser.driver.getCurrentUrl()?
Thanks.
Issue Analytics
- State:
- Created 9 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
browser.get vs browser.driver.get - TIPS AND TRICKS
Protractor's Documentation recommends using wrapped driver directly instead of ... browser.driver.get, When the web page doesn't have Angular components ...
Read more >node.js - Protractor : use browser or browser.driver methods?
The browser object is made up by composition of WebDriver methods and Protractor specific methods. So methods like sleep , wait , and ......
Read more >What is Selenium WebDriver? Introduction ... - Intellipaat
Each web browser has its own browser driver, such as Chrome, Firefox, and Internet Explorer (or HTTP Server). Developers can use Selenium to...
Read more >Why we write WebDriver driver = new ChromeDriver()
This driver instance has access to almost all the methods of WebDriver. This happens because every browser extends RemoteWebDriver and RemoteWebDriver ...
Read more >Selenium RemoteWebDriver : Difference between WebDriver ...
When test cases are executed, the WebDriver client libraries link with the browser drivers directly. On the other hand, if one tries to ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just to add to this - I find that
browser.driver
works better on AngularJS apps that take time to sync. I have tried both and for some reasonbrowser.driver
is more reliable.I think more clarity needs to added in relation to this as why not just use
browser.driver
as it works on both Angular and non-Angular apps and therefore eliminates this confusion as to which one to use.@ryancat Hi there. As far as I understood,
browser.driver.x
is for interaction with non-Angular pages andbrowser.x
methods are wrappers for interacting with Angular pages.