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

symfony - InvalidConfigurationException in SecurityExtension.php line 429: No authentication listener registered for firewall "secured_area" -

angular ui router - 10 digest iterations reached in angularjs when using $state.go -

javascript - Handling constructor related functions while testing with mocha and sinon -