How to find the "texts" in a Web page which is having no resources

Hi i am writing a script in browser which the message “server not found” is shown it should display a message called " connect to wifi "

public void f() throws InterruptedException {
dr.startActivity(“org.mozilla.firefox”, “org.mozilla.firefox.App”);
WebElement k = dr.findElement(“org.mozilla.firefox:id/url_bar_entry”));;
while (dr.scrollTo(“Server not found”).isDisplayed()){
System.out.println(" connect to wifi please ");

there is no id found for “Server not found” page

suggest me how can i take the text in the page to access

Advance thanks…