I am attempting to automate some functions within Chrome using Puppeteer and Chromium. I'm able to log in, select the main navigation element and the sub-navigation menu appears. I'm currently playing in the console to find the correct selector to pass into Puppeteer, however, I'm having difficulty.
HTML below:
<div id="popupTaskMenu" class="launcher...">
<div -not important to task></div>
<nav class="task_launcher_item_heading">
<div task-item="0" class="task_launcher_item_click">Text</div>
<div task-item="1" class="task_launcher_item">Text</div>
</nav>
<div>
With in the Chrome console I can get somewhat close to making the <nav>
items accessible by using document.getElementsByClassName("task_launcher_item_heading")[0].childNodes[0].innerText
, which will return the innerText of the element, but using the .click()
method comes back undefined.
Any ideas will surely help.