How to get text found between span selenium?

How to get text found between span selenium?

Hi Jacqueline "Inspect element from Google Chrome:

*Search Zone

I need to retrieve the ““Search Zone””, however, I’m unable to perform the search and getText(). I had to perform the following on Eclipse but getting an error:

Code:

String Header Text = driver.findElement(By.xpath(“”//span[@class = ‘number’]“”)).getText();

System.out.println(HeaderText);

Below is the error message:

org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {““method””:““xpath””,““selector””:“”//span[@class = ‘number’]“”}"