Protractor + chrome driver: Element is not clickable at point
Protractor + chrome driver: Element is not clickable at point
Hi I am having some trouble getting a basic protractor test to work.
My setup:
- I use requirejs so I init angular using angular.bootstrap(), not the ng-app attr. According to protractor docs this is not supported out of the box, but seems to work fine for tests that don' involve clicking.
Protractor conf.json:
"use strict"; exports.config = { specs: '../E2ETests/**/*.js', chromeOnly: true, getPageTimeout: 30000, allScriptsTimeout: 30000 }
- I use some third party jquery plugs which I wrap in directives, I suspect these might be part of the issue.
The test:
"use strict"; describe('When clicking should add stuff', function () { var ptor; beforeEach(function () { browser.get('https://localhost/myApp'); ptor = protractor.getInstance(); }); it('add stuff', function () { // If I comment this, the test pass. element(by.id('add-stuff-button')).click(); // This does not matter fails on the line above.. expect(browser.getTitle()).toBeDefined(); }); });
The error:
UnknownError: unknown error: Element is not clickable at point (720, 881). Other element would receive the click: ... (Session info: chrome=37.0.2062.124) (Driver info: chromedriver=2.10.267521,platform=Windows NT 6.1 SP1 x86_64)
Thoughts
The chromedriver do find the button, because if I change the id it complains that no element is found. So I think the problem is that the button moves from its initial position. As the element(***) function should wait for angular to be done, I suspect that its the third party plugins that might interfere as they might not use angular api's fetching data etc. So angular think its done but then the third party plug populates and moves stuff around.
Any ideas what to do? If the third party plugs is the problem, can I somehow tell angular that third party stuff is going on and then later tell it when its done?
Thx Br Twd
Answer by originof for Protractor + chrome driver: Element is not clickable at point
This happens if the chrome window is too small, try to add inside the beforeEach
browser.driver.manage().window().setSize(1280, 1024);
Answer by Gal Margalit for Protractor + chrome driver: Element is not clickable at point
You should set window size in your config file
onPrepare: function() { browser.manage().window().setSize(1600, 1000); }
Answer by Aman Gupta for Protractor + chrome driver: Element is not clickable at point
Following worked fine for me:
browser.actions().mouseMove(element).click();
Answer by Milena for Protractor + chrome driver: Element is not clickable at point
I had the same error and purely adjusting the screen size did not fix it for me.
Upon further inspection it looked as though another element was obscuring the button, hence the Selenium test failed because the button was not (and could not be) clicked. Perhaps that's why adjusting the screen size fixes it for some?
What fixed mine was removing the other element (and later adjusting the positioning of it).
Answer by xtrahelp.com for Protractor + chrome driver: Element is not clickable at point
You could also try turning off any debug tools you might be using. I was using Laravel and debugbar and had to set APP_DEBUG to false.
Fatal error: Call to a member function getElementsByTagName() on a non-object in D:\XAMPP INSTALLASTION\xampp\htdocs\endunpratama9i\www-stackoverflow-info-proses.php on line 72
0 comments:
Post a Comment