I am trying to extract the text from the DOM structure but I am facing difficulties. I have tried using getText();
and getAttribute();
methods, but I am not able to retrieve the desired text. I have also experimented with values like inner HTML, outer HTML, and text within the getAttribute(); method, but still unable to get the required text. Can someone assist me in extracting it?
<label class="">
<input type="checkbox" value="ml+4gvbuEG8Y3bBbAEbQvA==" name="selectedemployees" class="checkall">Alberta Weekly1
</label>
I am looking to display the text "Alberta Weekly1" in my console.