Tried to set innertext to third li of ul in angular 8 but not working.How to select ul and third li using queryselector to find the solution
app.component.html:
<tr>
<div class="wrapper">
<ul>
<li><span>Test 1</span></li>
<li><span>Test 2</span></li>
<li><span>Test 3</span></li>
<li><span>Test 4</span></li>
<li><span>Test 5</span></li>
</ul>
</div>
</tr>
app.component.ts:
setInnertext(event){
let getTr=event.target.closest('tr');
getTr.querySelector('.wrapper').querySelector('ul').querySelector('li:nth-child(3)').innerText="New Name";
}