I am using protractor for automating AngularJS application. There is a scenarios where I need to upload an image using the browse button and check that a progress bar is present while uploading in progress.
I am using the following code to achieve the same:
element(locator).sendKeys(pathOfTheImage);
expect(element(locatorOfProgressBar).isPresent()).toBeTruthy();
The problem here is - although the progress bar is present, the assertion fails always because element(locator).sendKeys(pathOfTheImage);
command is still in progress and has not returned anything to proceed with the next command , which is the assertion point.
I have tried using turning off the Synchronisation with no success:
browser.ignoreSynchronization = true;
Any solution to this issue? How can I proceed with the next commands without waiting for the sendKeys command to succeed?