0
votes

All my actions, it is just:

element(by.binding('item.order.id')).click();

On this code area:

<tr
  ng-repeat="item in dataList.content"
  ng-class="{'colored-order': (settingsStorage.getProperty('personal', 'coloredOrders') === true || settingsStorage.getProperty('personal', 'coloredOrders') === 'true')}"
  class="{{item.order.status}}"
>
  <td>
    <a
      href="{{contextPath}}/company/view/{{item.ownerId}}/"
      target="_blank"
    >
      <strong
        class="mL20"
        ng-if="search.viewType === 'ARRIVED'"
        ng-cloak
      >
        {{item.order.billTo.name}}
      </strong>
    </a>
    <strong
      class="mL20"
      ng-if="search.viewType !== 'ARRIVED'"
      ng-cloak
    >
      {{item.order.billTo.name}}
    </strong>
  </td>
  <td>
    <a
      ui-sref="vieworder({ orderId: item.order.id })"
      class="link_to_view_order"
      analytics-event
      analytics-category-attr="Order_View"
    >
      {{item.order.id}}
    </a>
  </td>
</tr>
Message:
    Failed: Timed out waiting for asynchronous Angular tasks to finish after 11 seconds. This may be because the current page is not an Angular application. Please see the FAQ for more details: https://github.com/angular/protractor/blob/master/docs/timeouts.md#waiting-for-angular
    While waiting for element with locator - Locator: by.binding("item.order.id").
    The following tasks were pending:
     - $timeout: function () {
          delete $rootScope.pagesCache.pages[data.page];
          if ($state.current.name == data.page) {
            $rootScope.$broadcast('update:data:' + data.page, { page: data.page });
          }
        }

But when i had try print to console this element, it was printed, without problems.

1
Bad question, no sufficient details and code.Gaurav
No details because no code, just i had get page, and to try click on link, and it's all. I got this error. After long google research, i haven't no answers for my issue.Oleksii Sytar
Don't the alternatives provided in the below answer work for you? .. @A.SitarAdityaReddy
@AdityaReddy yes, I think it can be useful, but i will mark this answer when i to try use it in my code, and if it resolve my problemOleksii Sytar
@A.Sitar .. Sure dude .. I was just checking if those alternatives worked on your appAdityaReddy

1 Answers

1
votes

Could be the same issue as answered in the question - Protractor Locator Time Out exception for AngularJs application

Normally root cause for these issues would be when site continuously polls $timeout or $http, Protractor will wait indefinitely and time out.

More details on why you could see this error is documented here.I have explained the below aletrnatives in detail in the other answer at

  1. IgnoreSynchronization: Check here

  2. Interval.js :

  3. Try with different timeOut configurations and see if your app polling stops after some time

allScriptsTimeout: 120000, getPageTimeout: 120000, jasmineNodeOpts: { defaultTimeoutInterval: 120000 }