javascript - Not able to iterate HTMLCollection in jQuery extension -


i working on form filler. below code working fine in chrome console, when put code in extension (form filler) not work.

jquery code:

var addresselement=$($('[data-name="selected-address"]')[0].children).filter(function(idx) {     return this.innerhtml.indexof('52') == 0; }); addresselement[0].click(); 

also tried javascript code

document.queryselectorall('[ng-bind="address.formattedaddress"]'); 

html:

<div class="select-replacement form-control" data-name="selected-address">     <a href="javascript:;" ng-click="selectaddress(address);" ng-repeat="address in address.addresslist" ng-bind="address.formattedaddress" class="ng-binding ng-scope">30, test data</a>     <a href="javascript:;" ng-click="selectaddress(address);" ng-repeat="address in address.addresslist" ng-bind="address.formattedaddress" class="ng-binding ng-scope">52, test data2</a> </div> 

note: have tried possible options in google. however, above selector not return array list of tags. please note works in developer console.

i fixed issue adding delay in code through setinterval


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -