List of usage examples for org.openqa.selenium WebDriver getTitle
String getTitle();
From source file:com.epam.gepard.examples.selenium.BasicSeleniumTest.java
License:Open Source License
@Test public void testGoogleMainPage() { Environment e = getTestClassExecutionData().getEnvironment(); String seleniumHostPort = e.getProperty(WebDriverUtil.SELENIUM_HOST) + ":" + e.getProperty(WebDriverUtil.SELENIUM_PORT); logComment("Using Selenium at: " + seleniumHostPort); webDriverUtil.gotoUrl("http://google.hu"); WebDriver wd = webDriverUtil.getWebDriver(); logComment("We are at: " + wd.getTitle()); }
From source file:com.francetelecom.clara.cloud.webapp.acceptancetest.pages.ApplicationCreationPage.java
License:Apache License
public ApplicationCreationPage(WebDriver wd) { super(wd);/*from ww w . ja v a 2 s . com*/ logger.debug("current url is : " + wd.getCurrentUrl()); logger.debug("page title : " + wd.getTitle()); // assert that we are on the right page SeleniumUtils.waitForElement(wd, "addAppButton", DEFAULT_AJAX_TIMEOUT); if (!wd.findElement(By.tagName("html")).getText().contains("create application")) { throw new IllegalStateException("this is not the new application page"); } logger.debug("you are in application creation page"); }
From source file:com.francetelecom.clara.cloud.webapp.acceptancetest.pages.ApplicationsOverviewPage.java
License:Apache License
public ApplicationsOverviewPage(WebDriver wd) { super(wd);/*from w ww.j a v a2 s. com*/ logger.debug("current url is : " + wd.getCurrentUrl()); logger.debug("page title : " + wd.getTitle()); // assert that we are on the right page if (!"orange paas - applications overview".equals(wd.getTitle())) { throw new IllegalStateException("this is not the aplications page, title page = " + wd.getTitle()); } logger.debug("you are in applications overview page"); }
From source file:com.francetelecom.clara.cloud.webapp.acceptancetest.pages.EnvironmentCreationPage.java
License:Apache License
public EnvironmentCreationPage(WebDriver wd) throws InterruptedException { super(wd);/*w w w .ja v a 2 s . co m*/ logger.debug("current url is : " + wd.getCurrentUrl()); logger.debug("page title : " + wd.getTitle()); // assert that we are on the right page create environment SeleniumUtils.waitForElement(wd, "addEnvButton", DEFAULT_AJAX_TIMEOUT); if (!wd.findElement(By.tagName("html")).getText().contains("create environment")) { logger.error( "This should contains 'create environment'" + wd.findElement(By.tagName("html")).getText()); throw new IllegalStateException("this is not the new environment page"); } logger.debug("you are in create environment page"); }
From source file:com.francetelecom.clara.cloud.webapp.acceptancetest.pages.EnvironmentDetailsPageSeleniumImpl.java
License:Apache License
private void assertWeAreInTheRequiredPage(WebDriver wd) { try {// w ww. j a va 2 s. c o m wd.findElement(By.xpath("//title[contains(.,'orange paas - environment details')]")); } catch (NoSuchElementException e) { logger.error( "you are not in environment details page because current page title does not contain [orange paas - environment details]"); logger.error("current page title is : " + wd.getTitle()); logger.error("current url is : " + wd.getCurrentUrl()); logger.error("current page source is: " + wd.getPageSource()); throw new IllegalStateException("this is not the environment detail page"); } logger.debug("current url is : " + wd.getCurrentUrl()); logger.debug("current page title is : " + wd.getTitle()); }
From source file:com.francetelecom.clara.cloud.webapp.acceptancetest.pages.EnvironmentsOverviewPage.java
License:Apache License
public EnvironmentsOverviewPage(WebDriver wd) { super(wd);/*w ww . j ava 2 s . co m*/ logger.debug("current url is : " + wd.getCurrentUrl()); logger.debug("page title : " + wd.getTitle()); // check that we are on the right page if (!"orange paas - environments overview".equals(wd.getTitle())) { throw new IllegalStateException("this is not the environment overview page: " + wd.getTitle()); } logger.debug("you are in environments overview page"); }
From source file:com.francetelecom.clara.cloud.webapp.acceptancetest.pages.HomePage.java
License:Apache License
public HomePage(WebDriver wd) { super(wd);/*from w w w . j av a 2 s. com*/ logger.debug("current url is : " + wd.getCurrentUrl()); logger.debug("page title : " + wd.getTitle()); // assert that we are on the right page if (!"orange paas - home page".equals(wd.getTitle())) { throw new IllegalStateException("this is not the home page, title page = " + wd.getTitle()); } logger.debug("you are in home page"); }
From source file:com.francetelecom.clara.cloud.webapp.acceptancetest.pages.LoginPage.java
License:Apache License
public LoginPage(WebDriver wd) { super(wd);/*from w w w . jav a2 s .co m*/ logger.debug("current url is : " + wd.getCurrentUrl()); logger.debug("page title : " + wd.getTitle()); // assert that we are on the right page if (!"Orange PaaS login".equals(wd.getTitle())) { throw new IllegalStateException("this is not the login page, title page = " + wd.getTitle()); } logger.debug("you are in login page"); }
From source file:com.francetelecom.clara.cloud.webapp.acceptancetest.pages.PopulatePage.java
License:Apache License
public PopulatePage(WebDriver wd) { super(wd);/*from ww w. j a va 2s .c om*/ logger.debug("current url is : " + wd.getCurrentUrl()); logger.debug("page title : " + wd.getTitle()); // assert that we are on the right page if (!"orange paas - populate data".equals(wd.getTitle())) { throw new IllegalStateException("this is not the populate data page, title page = " + wd.getTitle()); } logger.debug("you are in populate data page"); }
From source file:com.francetelecom.clara.cloud.webapp.acceptancetest.pages.ReleasesOverviewPage.java
License:Apache License
public ReleasesOverviewPage(WebDriver wd) { super(wd);/*from www . jav a 2 s . co m*/ logger.debug("current url is : " + wd.getCurrentUrl()); logger.debug("page title : " + wd.getTitle()); // assert that we are on the right page if (!"orange paas - releases overview".equals(wd.getTitle())) { throw new IllegalStateException( "this is not the releases overview page, title page = " + wd.getTitle()); } logger.debug("you are in release overview page"); }