How can I exclude a tag from the css selector. I have a html code below:
<div class="info">
<h3>Test 1</h3>
John Smith
</div>
I need to getText() only for John Smith not for <h3>.
The statement below is return full text Test 1 John Smith:
String txtFix = new WebDriverWait(Login.driver, 100).until(ExpectedConditions.visibilityOfElementLocated
(By.cssSelector(".info"))).getText();
Is it possible to get somehow only John Smith using css selector?