<div data-e2e="topBalanceTotal" class="templatesuccess__Wrapper-sc-4pme9a-0 dWpLPl">$0.00</div>
I want to change the inner text of this class, I use the following to try and do so but the console outputs undefined.
document.getElementByClassName('templatesuccess__Wrapper-sc-4pme9a-0 dWpLPl').innerHTML = '$100';
How do I get the following text? Maybe by getting the element by using data-e2e? I'm confused.
Asked
Active
Viewed 18 times
1

Code
- 11
- 6
-
`document.getElementByClassName('templatesuccess__Wrapper-sc-4pme9a-0 dWpLPl')[0].innerHTML = '$100'` – Mamun Mar 23 '19 at 04:08
-
1Thanks! I should've been able to figure this out by myself – Code Mar 23 '19 at 04:12