protractor icon indicating copy to clipboard operation
protractor copied to clipboard

Automation test cases are sporadically failing

Open mandip2kaur opened this issue 10 years ago • 2 comments

Automation test cases are sporadically failing. At times all the test cases are passing, and at times few are failing on Chrome and Firefox. Following Errors are present:

  • Index out of bound. Trying to access element at index: 1, but there are only 0 elements that match locator By(css selector, [ng-click="openMenu($mdOpenMenu, $event)"])
  • Element is not clickable at point (301, 315.6000061035156). Other element would receive the click:

I found following link on google as answer to my problem:http://www.blaiseliu.com/protractor-error-element-is-not-clickable-at-point-xx-xx/ . But Approach 2 and 3 might not be feasible as there are large number of elements clicked.

Please let me know the approach to be taken for test cases sporadically failing. Using angular:1.4.1 protractor:3.0.0

mandip2kaur avatar May 02 '16 12:05 mandip2kaur

Hi, are you certain your errors are due to window sizes? And I assume when you step through your tests all pass.

My personally experience on either errors above -

  1. Usually happens when it's data dependent and it fails due to timing.
  2. Other element would receive click - your locator could be returning more than one element and the intended one isn't being picked at the time.

You may want to try something such as click when clickable.
https://github.com/angular/protractor/issues/1555

-J

jeremycy avatar May 02 '16 14:05 jeremycy

Hi there!

Your question is better suited for StackOverflow or Gitter. Please ask a question there with the 'protractor' tag or post in the Gitter Channel to get help.

From the the getting help section of the README:

Please ask usage and debugging questions on StackOverflow (use the "protractor" tag) or in the Angular discussion group. (Please do not ask support questions here on Github.)

Thanks!

NickTomlin avatar May 03 '16 00:05 NickTomlin