Here is my current code snippet:
await enterName();
await enterCity();
await submit();
async enterName() {
element.sendKeys('name');
}
async submit() {
element.submit();
waitForAngular();
}
The problem I am facing is that when calling the submit function asynchronously, it fails to make any network calls. I attempted using controlFlow, but it only seems to work if I fetch the URL right before submitting.
protractor.promise.controlFlow.execute( driver.get(url));
await submit();
----------> this solves the issue!
However, my requirement is to first open the URL, fill out the form, and then initiate the asynchronous submit call. Is there anyone who can assist with this?