Protractor: Element is not clickable


#1

I just started to write my first Protractor test:

  it('should navigate', function () {
        scanButton.click();
        expect(browser.getTitle()).toEqual('ID');
        scanButton = element(by.id('scanSampleId'));
        scanButton.click();
        expect(browser.getTitle()).toEqual('Tara');
        var button = element(by.id('tara'));
        button.click();
        var button = element(by.id('analysis'));
        button.click();
    });

The problem is, that the second click causes 'Element is not clickable at point (645, 122).
Other element would receive the click: <div class="click-block"></div>

I think click-block is added by ionic ? If so how do I handle this in a protractor test ?


#2

Hi,

I am facing the same issue. I think it is caused by the transition between states and their animation. Have you found a solution to this problem?

Cheers!
Fred


#3

Checking absence of $('.click-block-active') before clicking solved for me.

browser.wait(ExpectedConditions.stalenessOf($('.click-block-active'));

Update
I didn’t notice the question was posted in 2015. However, latest ionic 2 projects have the same issue.