In my opinion, in the spirit of a tractor, No, this is not possible. A protractor is a layer above selenium. Webdriver is a kind of JSON protocol that sends a command to communicate with the browser. These commands are stored in the promises queue and then returned by async to Protractor. You can then do an Assertion with the keyword βWaitβ for jasmine to inspect the DOM.
If you still need to find a way, you will try the hacker way:
browser.driver.executeScript ("YOUR JAVASCRIPT CODE HERE;");
Then you exchange this call in the .wait () browser, but I would not recommend this method.
thanks
source share