Question Answer Fun
HTML
<div style="" id="soruKapsul">
<div class="clearfix" id="soruZaman">
<p style="padding-top: 3px">
Geçen Süre:
</p>
<p class="soruZamanBg" id="soruZamanDakika">00</p>
<p>
:
</p>
<p class="soruZamanBg" id="soruZamanSaniye">10</p>
</div>
<div id="soruTop">
</div>
<div id="soru">
<div style="float: left" id="soruSira">1.SORU</div>
<div>
<table cellspacing="0" cellpadding="0" style="width: 500px">
<tbody>
<tr>
<td style="font-weight: bold; padding-left:5px; padding-top:7px;">Garanti Emeklilik üyeleri Hobi Kulüpleri etkinliklerine katılırken indirimli ücretten kaç misafir getirebilir?</td>
</tr>
</tbody>
</table>
</div>
</div>
...
JavaScript
var labels = document.getElementsByTagName('li'); //get the li
for (var i = 0; i < labels.length; ++i) { //loop through the li
if (labels[i].textContent == "misafir getirebilir") { //check li text
labels[i].click(); //if correct text, click the li
}
}
console.log ("answerTxt: ", labels);