Below is the portion of html code of the webpage i am scraping using puppeteer. The id's are starting with numericals.
<div class="inner-menu">
<ul class="module" style="float: left">
<li id="0" class="moduleclass"><a class="active" href="/eu/alt/dashboard.htm">Home</a></li>
<li id="4" class="moduleclass"><a class="" href="/eu/stu/studentBasicProfile.htm">Student</a></li>
<li id="6" class="moduleclass"><a class="" href="/eu/exm/viewStudentExamDefinition.htm">Exam</a></li>
<li id="7" class="moduleclass">
<a class="" href="/eu/res/semesterGradeCardListing.htm">Result</a>
</li>
</ul>
</div>
I need to click on li with id 7. I tried using the code
await page.waitForSelector("#\\37 ");
await page.click("#\\37 ");
But it is not working.
Aucun commentaire:
Enregistrer un commentaire