OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

WHY I CAN'T MANIPULATE DOM?

  • Thread starter Thread starter Antonio Paz
  • Start date Start date
A

Antonio Paz

Guest
I'm developing an info collecting js script for my banc transactions, but it doesn't work, there's some tags my script don't find even if it is already there, one of those tags is this one

I trying save <bbva-btge-sidebar-menu> in a var and i get nothing, this is mi actual code


Code:
window.onload = function () {
  var intervalo = setInterval(function () {
    //var toSend = [];
    console.log("Inicia");
    var btn_modal=document.querySelectorAll(".close-btn");
    if(btn_modal.length>0){
      btn_modal[1].click();
      var div_cuentas=document.querySelector('bbva-web-navigation-menu-item[icon="bbva:account"]');
      if(div_cuentas){
        var btn_mis_cuentas=div_cuentas.querySelector('bbva-web-navigation-menu-item-action[role="button"]');
        if(btn_mis_cuentas){
          btn_mis_cuentas.click();
        }else{
          console.error("No se encontro role=button");
        }
      }else{
        console.error("No se encontro icon=bbva:account");
      }
    }else{
      console.error("No se encontraron .close-btn");
    }
  }, 10000); //Termina el temporizador y se coloca el tiempo para que se repita
};

Code:
<bbva-btge-app-template id="app__content">
  <bbva-btge-sidebar-menu class="sidebar" slot="nav" home-page="bbva-btge-dashboard-solution-home" expanded=""></bbva-btge-sidebar-menu>
</bbva-btge-app-template>

Try using JQuery for dom manipulation also try with document.getelement and document.queryselector, i was expecting to save that elements on vars but not happend, it didn't find it

<p>I'm developing an info collecting js script for my banc transactions, but it doesn't work, there's some tags my script don't find even if it is already there, one of those tags is this one</p>
<p>I trying save <code><bbva-btge-sidebar-menu></code> in a var and i get nothing, this is mi actual code</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>window.onload = function () {
var intervalo = setInterval(function () {
//var toSend = [];
console.log("Inicia");
var btn_modal=document.querySelectorAll(".close-btn");
if(btn_modal.length>0){
btn_modal[1].click();
var div_cuentas=document.querySelector('bbva-web-navigation-menu-item[icon="bbva:account"]');
if(div_cuentas){
var btn_mis_cuentas=div_cuentas.querySelector('bbva-web-navigation-menu-item-action[role="button"]');
if(btn_mis_cuentas){
btn_mis_cuentas.click();
}else{
console.error("No se encontro role=button");
}
}else{
console.error("No se encontro icon=bbva:account");
}
}else{
console.error("No se encontraron .close-btn");
}
}, 10000); //Termina el temporizador y se coloca el tiempo para que se repita
};</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code><bbva-btge-app-template id="app__content">
<bbva-btge-sidebar-menu class="sidebar" slot="nav" home-page="bbva-btge-dashboard-solution-home" expanded=""></bbva-btge-sidebar-menu>
</bbva-btge-app-template></code></pre>
</div>
</div>
</p>
<p>Try using JQuery for dom manipulation also try with document.getelement and document.queryselector, i was expecting to save that elements on vars but not happend, it didn't find it</p>
 

Latest posts

Online statistics

Members online
0
Guests online
4
Total visitors
4
Top