javascript - Element not visible error -


this question has answer here:

i trying click on upload file link on page upload link said not visible. i've tried hovering on link , code below. has been fixed me before i'm confused on how go getting link clicked. i've tried:

var ec = protractor.expectedconditions;  var uploadlink = element(by.model('roomplanctrl.mm2010file'));    browser.wait(ec.elementtobeclickable(uploadlink), 10000);  uploadlink.click();

the html:

<span class="dg-link ng-untouched ng-valid ng-dirty ng-valid-parse" ngf-select="" ng-model="roomplanctrl.mm2010file" accept=".mms" ng-hide="roomplanctrl.hideimportlinks">upload meetingmatrix 2010 file</span>

if element not visible, can try scrolling element , click on it. if visible on page wait until loads , click on chaining wait() function. here's sample of -

var ec = protractor.expectedconditions; var uploadlink = element(by.model('roomplanctrl.mm2010file')); browser.wait(ec.elementtobeclickable(uploadlink), 10000).then(function(){     uploadlink.click(); }); 

hope helps.


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -