Need to check the text is available after break(br) tag
HTML code:
<div class="a-column a-span3">
<a class="footer-link" target="_blank" rel="noopener" href="https://www.community.com/">
<span class="footer"><b>Community</b></span>
<br>
Connect
<br>and fun
</a>
</div>
<div class="a-column a-span3">
<a class="footer-link" target="_blank" rel="noopener" href="https://www.google.com/">
<span class="footer"><b>google</b></span>
<br>
Contact
<br>and get help
</a>
</div>
I tried and got the error is:
1) AssertionError: expected false to be truthy
48 | async checkFooter(footerText){
> 49 | await t.expect((Selector('[id=container]').child('div').nth(14).child('div').nth(5).child('div').child('div').nth(2).child('a').withText(footerText)).exists).ok();
50 | }
Normal Xpath: //*[@id="container"]/div[14]/div[5]/div/div[2]/a/text()[1]
How to write xpath for this element with text('Contact') and verify it is available after the break statement