Currently, I am in the process of creating an end-to-end test suite with Protractor.
As Protractor is based on WebdriverJS, I am attempting to utilize some of its functionality.
More specifically, my goal is to incorporate certain behaviors using WebdriverJS' promise manager, which according to the documentation, can be achieved by using
webdriver.promise.controlFlow().execute(function myBehavior(){...});
The issue arises when I realize that I am unsure how to access the "webdriver" object since there isn't a global variable named "webdriver".
If anyone has any insights or solutions to this dilemma, your assistance would be greatly appreciated.
UPDATE:
After successfully resolving the initial query, it should be noted that the correct method to use is
browser.driver.controlFlow()
rather than
browser.driver.promise.controlFlow()
as suggested by the WebdriverJS documentation. Thank you for clarifying this important detail.