Protractor How to click on an empty place

We use Protractor to test the Angular JS project. I need to click on an empty space (any empty space) to start automatic saving after filling in all the necessary fields.

But I do not know how to do this. I tried to find a useless image or click on a text field. He cannot work.

Stacktrace:

UnknownError: unknown error: the element does not click at the point (975, 357). Another item will receive a click: ... *

Any comments would be helpful, thanks very much.

+4
source share
2 answers

One option is to find a specific item and click with an offset:

var elm = element(by.css('.material-dialog-container'));
browser.actions()
    .mouseMove(elm, -20, -20)
    .click()
    .perform();

If the offset is calculated from the upper left corner of the element.

+4

document.body

, .

element = angular.element('<your-directive></your-directive>');
compile(element)(scope).appendTo(document.body);
+1

Source: https://habr.com/ru/post/1599433/


All Articles