I'm writing an e2e test suite using Protractor.
I know it's built on top of WebdriverJS, and I'm trying to using some webdriverJS functionality.
Namely, I'm trying to enqueue some behavior using the webdriverJS' promise manager, and the WebdriverJS documentation says I should use
webdriver.promise.controlFlow().execute(function myBehavior(){...});
Trouble is, I don't know how to access that "webdriver" object. There is no global variable named "webdriver".
Can someone help me on this?
EDIT:
Now that the question has been solved, I'd like to highlight the fact that one must use
browser.driver.controlFlow()
and not
browser.driver.promise.controlFlow()
despite what WebdriverJS documentation may suggest.
The documentation says browser.driver
is the underlying webdriver.
So can you try this:
browser.driver.controlFlow().execute(function myBehavior(){...});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With