I'm trying to parse the below html
<div class="no-margin">
<h2 data-outlined="false" class="">Use Google Assistant's Driving mode</h2>
<p ...
taken from https://support.google.com/assistant/answer/6041199. I have the lxml element for the parent div with class no-margin and I iterate its getchildren(). The first child element is the one with h2 but its text returns None and tail returns \n\n. Why is the text None? etree.tostring for the h2 element prints b'<h2/>\n\n' if it is any relevant.
Any help is much appreciated.
I tried a minimal example parsing that fragment with e.g.
Result:
Consider to edit your question and to provide a minimal but complete sample allowing others to reproduce the problem.