One of the webelements that I am trying to get the text from has a link/tag as part of that element, that I want to exclude from selecting, but can not figure out how.
This is my code:
await browser.url('https://www.facebook.com/');
logInBtn = await $('button[type=submit]').click();
const logInErrorMsg = await $('div*=The email or mobile').getText();
here is the screen shot of what I want to get from that tag:
with the code above it is getting the highlighted text and along with the link.
Please advise best way as I am looking everywhere for couple of days and can not figure it out.