admin管理员组文章数量:1435859
We are using Protractor to test an Angular JS project. There is one page I need to click on a blank place (any blank place) to trigger the auto save after filled in all the required fields.
But I don't know how. I tried to find a useless image or click back on a text box. It cannot work.
Stacktrace:
UnknownError: unknown error: Element is not clickable at point (975, 357). Other element would receive the click: ...*
Any ments will be helpful, thanks very much.
We are using Protractor to test an Angular JS project. There is one page I need to click on a blank place (any blank place) to trigger the auto save after filled in all the required fields.
But I don't know how. I tried to find a useless image or click back on a text box. It cannot work.
Stacktrace:
UnknownError: unknown error: Element is not clickable at point (975, 357). Other element would receive the click: ...*
Any ments will be helpful, thanks very much.
Share Improve this question edited Jul 24, 2015 at 3:24 alecxe 475k127 gold badges1.1k silver badges1.2k bronze badges asked Jul 24, 2015 at 2:43 RosalineRosaline 612 silver badges3 bronze badges 1- Maybe browser.actions().click(protractor.Button.LEFT).perform(); – Chong Tang Commented Jul 24, 2015 at 2:58
2 Answers
Reset to default 6One option would be to find a particular element and click with an offset:
var elm = element(by.css('.material-dialog-container'));
browser.actions()
.mouseMove(elm, -20, -20)
.click()
.perform();
Where the offset is counted from the top left corner of the element.
in such cases you can click on document.body
if you are testing a directive you need to append it to the body first.
element = angular.element('<your-directive></your-directive>');
pile(element)(scope).appendTo(document.body);
本文标签: javascriptProtractor How to click on a blank placeStack Overflow
版权声明:本文标题:javascript - Protractor How to click on a blank place - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744562374a2612838.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论