Edster Edster - 1 year ago 190
AngularJS Question

Testing Angular ng-click link with Geb

I am trying to test if an Angular ng-click link is being clicked with Geb. Link does not really navigate anywhere, so test should stay on the same page. But seems that test can't find my link definition on my Geb UI page.


<a ng-click="menuAction('open')">...</a>

Geb UI Page "MainPage":

openLink { $("a", "ng-click":"menuAction('open')") }

to MainPage


at MainPage

Getting the following error:

org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (898, 147). Other element would receive the click: <div ng-show="processing" class="my-new-container ng-scope">...</div>

Found similar problem here.
Testing Angular dynamic page content (ng-if) with Geb
But unfortunately it did not help me to resolve my problem.

Appreciate any help!

Answer Source

This was solution to my problem.

openLink(to: OtherPage) { $("a", "ng-click": "menuAction('open')") }
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download