javascript - How do I programatically access the current webdriver instance? -
i'm writing e2e test suite using protractor.
i know it's built on top of webdriverjs, , i'm trying using webdriverjs functionality.
namely, i'm trying enqueue behavior using webdriverjs' promise manager, , webdriverjs documentation says should use
webdriver.promise.controlflow().execute(function mybehavior(){...});
trouble is, don't know how access "webdriver" object. there no global variable named "webdriver".
can me on this?
edit:
now question has been solved, i'd highlight fact 1 must use
browser.driver.controlflow()
and not
browser.driver.promise.controlflow()
despite webdriverjs documentation may suggest.
the documentation says browser.driver
underlying webdriver.
so can try this:
browser.driver.controlflow().execute(function mybehavior(){...});
Comments
Post a Comment