class HomePage extends Page {

	public String getH1() {
		return h1Element.getText();
	}

}

class HomePageTest extends Page {

	 HomePage homepage;

	@Test
	public void testH1Existing() throws InterruptedException {

		Assert.assertTrue(homepage.getH1() != null);
	}

}