1

I am working on an automation project where we are using protractor and jasmine2 for automating our angularjs+nodejs app. So as part of automation I have a scenario where I need to upload a file and just after clicking the file upload button, while the upload is on progress, I need to click on another button and validate something. And when I execute my script, protractor is waiting by itself until the upload process is complete to perform further steps. Is there anyway to handle this? Means after clicking the upload button, script need to perform the next action without even waiting for the upload to complete.

I am sure that this is something related to the control flow, where the promises are added to the event queue. Is there any way to change protractor's event queue?

4

1 回答 1

1

我记得有一个类似的问题,我不得不暂时关闭同步

browser.ignoreSynchronization = true;
uploadButton.click();
anotherButton.click();

您还可以通过“动作链”在单个命令中执行两次单击:

browser.actions()
  .mouseMove(uploadButton).click()
  .mouseMove(anotherButton).click()
  .perform();
于 2016-07-20T01:21:06.513 回答