javascript - Protractor can not find any elements yet elements render in browser -


has come across scenario protractor script can not find of elements (count == 0) yet elements rendering in browser? testing section of our site changed , tests failing. when use "elementor" or other debugging tools, says no elements found elements on page. yet page rendering correctly.

when inspect using elementor see:

[by.css('section[ng-controller="app.datepickercontroller vm"]'): “0” 

where 0 count.

and:

[by.css('section.panel-body'): "12" 

where 12 count same element.

below sample of html. supposed display "datepicker".

<section class="panel-body ng-scope" ng-controller="app.datepickercontroller vm"> <div class="row"> <div class="col-md-4"> <h3>datepicker</h3> <div td-datepicker="" show-ignore-year="vm.showignoreyear" show-all-before="vm.showallbefore" all-before="vm.allbefore" show-all-after="vm.showallafter" all-after="vm.allafter" ignore-year="vm.ignoreyear" date="vm.date" disabled="vm.dateisdisabled" class="ng-isolate-scope"> <div class="td-datepicker" ng-class="{ open: vm.open, invalid: !vm.isvalid &amp;&amp; vm.hasopened &amp;&amp; !vm.open }"> <div class="input-group"><div class="td-datepicker-value" ng-click="vm.toggle()" ng-disabled="vm.   disabled" ng-class="vm.disabled ? 'disabled' : ''"> <span class="td-datepicker-value-month ng-binding" ng-class="{ active: vm.open &amp;&amp; vm.mode === 'month' }">mm</span>/ <span class="td-datepicker-value-day ng-binding" ng-class="{ active: vm.open &amp;&amp; vm.mode === 'day' }">dd</span>/ <span class="td-datepicker-value-year ng-binding" ng-class="{ active: vm.open &amp;&amp; vm.mode === 'year' }">yyyy</span> </div> <div ng-class="{ 'active': vm.open, 'disabled': vm.disabled}" class="input-group-addon" ng-click="vm.toggle()" ng-disabled="vm .disabled"><i class="md md-today"></i> </div> 

<div ng-show="vm.open" class="td-datepicker-popover ng-hide"> 
month day year

------controller (function () {

'use strict';  angular     .module('app')     .controller('app.datepickercontroller', appdatepickercontroller);  function appdatepickercontroller() {     /*jshint validthis:true */     var vm = this;     // disable functionality controller     // using date picker example     vm.dateisdisabled = true;      // date picker     vm.date = undefined;     vm.showignoreyear = true;     vm.showallbefore = false;     vm.allbefore = false;     vm.showallafter = true;     vm.allafter = true;     vm.showignoreyear = false;     vm.ignoreyear = false;      // year picker     vm.year = undefined;      // month picker     vm.myear = undefined;     vm.mmonth = undefined;      // quarter picker     vm.qyear = undefined;     vm.qquarter = undefined;      // week picker     vm.wyear = undefined;     vm.wweek = undefined; } 

})();

this resolved after convincing developer coding issue..and not browser issue.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -