protractor icon indicating copy to clipboard operation
protractor copied to clipboard

Element is not clickable at point (1254, 21). Other element would receive the click: in protractor, Testing Angularjs UI with selenium server

Open rajit-daffodil opened this issue 12 years ago • 9 comments

I am using protractor and selenium server with angularjs for UI testing,

This is my TestCase

it('Click on Top Headings one by one', function () {
//click on Top Heading one by one ptor.element.all(by.repeater('application in workbenchOptions.applications')).then(function (arrs) { ptor.sleep(3000); arrs[2].click() ptor.sleep(3000); arrs[3].click() ptor.sleep(3000); arrs[1].click() ptor.sleep(3000); arrs[2].click() ptor.sleep(3000); arrs[0].click() ptor.sleep(2000); }); }) everything is clicking , but if in the begining suppose arrs[0] is already open then I am not able to click on this again and I got a error message

UnknownError: unknown error: Element is not clickable at point (1254, 21). Other element would receive the click: ...

I have use both chrome and Firefox and same error occurs

I have also use ptor.actions().mouseMove(arrs[0]).click().perform() , but this also does not working screenshot from 2014-11-15 10 20 23 screenshot from 2014-11-15 10 42 28 screenshot from 2014-11-15 10 42 35

rajit-daffodil avatar Nov 15 '14 07:11 rajit-daffodil

Is there any overlay blocking? That is what I receive when I have an overlay of spanning wheel.

On Sat, Nov 15, 2014 at 2:38 AM, rajit-daffodil [email protected] wrote:

I am using protractor and selenium server with angularjs for UI testing,

This is my TestCase

it('Click on Top Headings one by one', function () {

//click on Top Heading one by one ptor.element.all(by.repeater('application in workbenchOptions.applications')).then(function (arrs) { ptor.sleep(3000); arrs[2].click() ptor.sleep(3000); arrs[3].click() ptor.sleep(3000); arrs[1].click() ptor.sleep(3000); arrs[2].click() ptor.sleep(3000); arrs[0].click() ptor.sleep(2000); }); }) everything is clicking , but if in the begining suppose arrs[0] is already open then I am not able to click on this again and I got a error message

UnknownError: unknown error: Element is not clickable at point (1254, 21). Other element would receive the click: ...

I have use both chrome and Firefox and same error occurs

I have also use ptor.actions().mouseMove(arrs[0]).click().perform() , but this also does not working [image: screenshot from 2014-11-15 10 20 23] https://cloud.githubusercontent.com/assets/7080384/5056941/622c4656-6cc8-11e4-84d5-ae714ba25ad2.png [image: screenshot from 2014-11-15 10 42 28] https://cloud.githubusercontent.com/assets/7080384/5056942/696306bc-6cc8-11e4-8196-444c3bc2accb.png [image: screenshot from 2014-11-15 10 42 35] https://cloud.githubusercontent.com/assets/7080384/5056943/6cb2c500-6cc8-11e4-8785-d6b0068f0a52.png

— Reply to this email directly or view it on GitHub https://github.com/angular/protractor/issues/1530.

jlin412 avatar Nov 15 '14 13:11 jlin412

No, There is no overlay blocking

rajit-daffodil avatar Nov 17 '14 06:11 rajit-daffodil

I have re-checked my testcase and found someWhat different this time, Now Every Heading is clickable, but still getting this message

UnknownError: unknown error: Element is not clickable at point (1254, 21). Other element would receive the click: <div class="slider-wrapper pl-pageslide-wrapper" style="transition: width 0.3s, height; -webkit-transition: width 0.3s, height; z-index: 1000; position: fixed; left: 0px; top: 0px; bottom: 0px; right: 0px; width: auto; background: rgba(0, 0, 0, 0.498039);">...

and when i am checking class slider-wrapper through inspect element , I am finding that this class covers complete UI and I think because of this I am getting this error, is there any way to come out of this???

and I have one other issue within the same, suppose previously my Top Heading opened/Clicked is AshuTests and when I am expecting expect(arrs[3].getText()).toBe('AshuTests');

then this gives me this error

Expected 'AshuTests ExcelImport UploadTest MarketPlaceTest' to be 'AshuTests'

why it is considering sub-Heading also, is it possible that I get only Top Heading for this also

rajit-daffodil avatar Nov 17 '14 13:11 rajit-daffodil

Please read the contributing guidelines; these types of questions are ill-suited for GitHub. Thanks!

juliemr avatar Nov 17 '14 18:11 juliemr

I've got a such problem as. The problem is that the button changes its location. When you try click at the second time. The driver click on the old place. It does not call event. It emulates the mouse click. I use IONIC navigation bar. It uses translate3d. It shifts the main area. If I move back it. The button test becomes work again.

victor-shelepen avatar Aug 21 '15 10:08 victor-shelepen

Thank you, you are right

rajit-daffodil avatar Aug 21 '15 13:08 rajit-daffodil

var elem = element(by.id('yourId'));
browser.actions().mouseMove(elem).click();

will fix the problem

DedrickEnc avatar Mar 05 '16 14:03 DedrickEnc

I tried with @DedrickEnc solution. It's also worked fine for me.

dinuka-liyanage avatar Mar 07 '16 07:03 dinuka-liyanage

@DedrickEnc's solution works for me sometimes. Other times it results in the above error. :confused:

kalexmills avatar Sep 24 '18 20:09 kalexmills