0

I am trying to test "export to csv" feature, I am getting an error Element is not clickable at point (967, 125). Other element would receive the click:

Here is my code :

describe('csv download link', () => { it('should get the csv table export', () => { var exportToCsv = element(by.css('a[ng-click="vm.exportToCsv()"]')).click().then(() => { var filename = 'lastPublishedPage.csv'; expect(downloader.downloadedFileExists(filename)).toBe(true); }); }); 
1
  • When you watch, is the field on screen? This error can sometimes happen when the field exists, but needs to be scrolled to. Commented Aug 31, 2016 at 0:23

1 Answer 1

0

This is a duplicate question, please look at here

Protractor + chrome driver: Element is not clickable at point

Here is the answer

You should set window size in your config file

onPrepare: function() { browser.manage().window().setSize(1600, 800); } 

If it still doesn't work you should scroll to the element's location

describe('csv download link', () => { it('should get the csv table export', () => { // scroll to exportToCsv's location browser.executeScript('window.scrollTo(967, 125);'); var exportToCsv = element(by.css('a[ng-click="vm.exportToCsv()"]')).click().then(() => { var filename = 'lastPublishedPage.csv'; expect(downloader.downloadedFileExists(filename)).toBe(true); }); }); }); 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.