Example usage for org.openqa.selenium.support.ui ExpectedConditions titleContains

List of usage examples for org.openqa.selenium.support.ui ExpectedConditions titleContains

Introduction

In this page you can find the example usage for org.openqa.selenium.support.ui ExpectedConditions titleContains.

Prototype

public static ExpectedCondition<Boolean> titleContains(final String title) 

Source Link

Document

An expectation for checking that the title contains a case-sensitive substring

Usage

From source file:com.pentaho.ctools.cdf.AnalyzerComponent.java

License:Apache License

/**
 * ############################### Test Case 1 ###############################
 *
 * Test Case Name:/*from   www  .j a  v a2  s.  co  m*/
 *    Display Content
 * Description:
 *    Check if the contents present in page is the expected.
 * Steps:
 *    1. Check title web page and sample title.
 */
@Test
public void tc1_PageContent_DisplayTitle() {
    this.log.info("tc1_PageContent_DisplayTitle");
    // Wait for title become visible and with value 'Community Dashboard Framework'
    wait.until(ExpectedConditions.titleContains("Community Dashboard Framework"));
    // Wait for visibility of 'VisualizationAPIComponent'
    wait.until(ExpectedConditions
            .visibilityOfElementLocated(By.xpath("//div[@id='dashboardContent']/div/div/div/h2/span[2]")));

    // Validate the sample that we are testing is the one
    assertEquals("Community Dashboard Framework", driver.getTitle());
    assertEquals("AnalyzerComponent", this.elemHelper.WaitForElementPresentGetText(driver,
            By.xpath("//div[@id='dashboardContent']/div/div/div/h2/span[2]")));
}

From source file:com.pentaho.ctools.cdf.CommentComponent.java

License:Apache License

/**
 * ############################### Test Case 1 ###############################
 *
 * Test Case Name://from  w w w . j av  a 2  s. com
 *    Reload Sample
 * Description:
 *    Reload the sample (not refresh page).
 * Steps:
 *    1. Click in Code and then click in button 'Try me'.
 */
@Test
public void tc1_PageContent_DisplayTitle() {
    this.log.info("tc1_PageContent_DisplayTitle");
    // Wait for title become visible and with value 'Community Dashboard Framework'
    wait.until(ExpectedConditions.titleContains("Community Dashboard Framework"));
    // Wait for visibility of 'VisualizationAPIComponent'
    wait.until(ExpectedConditions
            .visibilityOfElementLocated(By.xpath("//div[@id='dashboardContent']/div/div/div/h2/span[2]")));

    // Validate the sample that we are testing is the one
    assertEquals("Community Dashboard Framework", driver.getTitle());
    assertEquals("CommentsComponent", this.elemHelper.WaitForElementPresentGetText(driver,
            By.xpath("//div[@id='dashboardContent']/div/div/div/h2/span[2]")));
}

From source file:com.pentaho.ctools.cdf.DateRangeInputComponent.java

License:Apache License

/**
 * ############################### Test Case 1 ###############################
 *
 * Test Case Name://from  w  w w  .  ja  va 2 s.c o  m
 *    Validate Page Contents
 * Description:
 *    Here we want to validate the page contents.
 * Steps:
 *    1. Check the widget's title.
 */
@Test
public void tc1_PageContent_DisplayTitle() {
    // Wait for title become visible and with value 'Community Dashboard Framework'
    wait.until(ExpectedConditions.titleContains("Community Dashboard Framework"));
    // Wait for visibility of 'VisualizationAPIComponent'
    wait.until(ExpectedConditions
            .visibilityOfElementLocated(By.xpath("//div[@id='dashboardContent']/div/div/div/h2/span[2]")));

    // Validate the sample that we are testing is the one
    assertEquals("Community Dashboard Framework", driver.getTitle());
    assertEquals("DateRangeInputComponent", this.elemHelper.WaitForElementPresentGetText(driver,
            By.xpath("//div[@id='dashboardContent']/div/div/div/h2/span[2]")));
}

From source file:com.pentaho.ctools.cdf.DialComponent.java

License:Apache License

/**
 * ############################### Test Case 2 ###############################
 *
 * Test Case Name://from   w w  w.j  a  va 2s .c  om
 *    Reload Sample
 * Description:
 *    Reload the sample (not refresh page).
 * Steps:
 *    1. Click in Code and then click in button 'Try me'.
 */
@Test
public void tc1_PageContent_DisplayTitle() {
    this.log.info("tc1_PageContent_DisplayTitle");
    // Wait for title become visible and with value 'Community Dashboard Framework'
    wait.until(ExpectedConditions.titleContains("Community Dashboard Framework"));
    // Wait for visibility of 'VisualizationAPIComponent'
    wait.until(ExpectedConditions
            .visibilityOfElementLocated(By.xpath("//div[@id='dashboardContent']/div/div/div/h2/span[2]")));

    // Validate the sample that we are testing is the one
    assertEquals("Community Dashboard Framework", driver.getTitle());
    assertEquals("DialComponent", this.elemHelper.WaitForElementPresentGetText(driver,
            By.xpath("//div[@id='dashboardContent']/div/div/div/h2/span[2]")));
}

From source file:com.pentaho.ctools.cdf.ExecuteAnalyzerComponent.java

License:Apache License

/**
 * ############################### Test Case 2 ###############################
 *
 * Test Case Name:/*from www  . jav a  2s .c o  m*/
 *    Reload Sample
 * Description:
 *    Reload the sample (not refresh page).
 * Steps:
 *    1. Click in Code and then click in button 'Try me'.
 */
@Test
public void tc1_PageContent_DisplayTitle() {
    this.log.info("tc1_PageContent_DisplayTitle");
    // Wait for title become visible and with value 'Community Dashboard Framework'
    wait.until(ExpectedConditions.titleContains("Community Dashboard Framework"));
    // Wait for visibility of 'VisualizationAPIComponent'
    wait.until(ExpectedConditions
            .visibilityOfElementLocated(By.xpath("//div[@id='dashboardContent']/div/div/div/h2/span[2]")));

    // Validate the sample that we are testing is the one
    assertEquals("Community Dashboard Framework", driver.getTitle());
    assertEquals("ExecuteAnalyzerComponent", this.elemHelper.WaitForElementPresentGetText(driver,
            By.xpath("//div[@id='dashboardContent']/div/div/div/h2/span[2]")));
}

From source file:com.pentaho.ctools.cdf.ExecutePrptComponent.java

License:Apache License

/**
 * ############################### Test Case 2 ###############################
 *
 * Test Case Name://from   w  ww . j av a 2s .c  o  m
 *    Reload Sample
 * Description:
 *    Reload the sample (not refresh page).
 * Steps:
 *    1. Click in Code and then click in button 'Try me'.
 */
@Test
public void tc1_PageContent_DisplayTitle() {
    this.log.info("tc1_PageContent_DisplayTitle");
    // Wait for title become visible and with value 'Community Dashboard Framework'
    wait.until(ExpectedConditions.titleContains("Community Dashboard Framework"));
    // Wait for visibility of 'VisualizationAPIComponent'
    wait.until(ExpectedConditions
            .visibilityOfElementLocated(By.xpath("//div[@id='dashboardContent']/div/div/div/h2/span[2]")));

    // Validate the sample that we are testing is the one
    assertEquals("Community Dashboard Framework", driver.getTitle());
    assertEquals("ExecutePrptComponent", this.elemHelper.WaitForElementPresentGetText(driver,
            By.xpath("//div[@id='dashboardContent']/div/div/div/h2/span[2]")));
}

From source file:com.pentaho.ctools.cdf.ExecuteXactionComponent.java

License:Apache License

/**
 * ############################### Test Case 1 ###############################
 *
 * Test Case Name:/*from  w  ww  .  j a  v a  2s .  com*/
 *    Reload Sample
 * Description:
 *    Reload the sample (not refresh page).
 * Steps:
 *    1. Click in Code and then click in button 'Try me'.
 */
@Test
public void tc1_PageContent_DisplayTitle() {
    // Wait for title become visible and with value 'Community Dashboard Framework'
    wait.until(ExpectedConditions.titleContains("Community Dashboard Framework"));
    // Wait for visibility of 'VisualizationAPIComponent'
    wait.until(ExpectedConditions
            .visibilityOfElementLocated(By.xpath("//div[@id='dashboardContent']/div/div/div/h2/span[2]")));

    // Validate the sample that we are testing is the one
    assertEquals("Community Dashboard Framework", driver.getTitle());
    assertEquals("ExecuteXactionComponent", this.elemHelper.WaitForElementPresentGetText(driver,
            By.xpath("//div[@id='dashboardContent']/div/div/div/h2/span[2]")));
}

From source file:com.pentaho.ctools.cdf.JFreeChartComponent.java

License:Apache License

/**
 * ############################### Test Case 2 ###############################
 *
 * Test Case Name://from w w  w  .  ja  v a 2 s.  c o  m
 *    Reload Sample
 * Description:
 *    Reload the sample (not refresh page).
 * Steps:
 *    1. Click in Code and then click in button 'Try me'.
 */
@Test
public void tc1_PageContent_DisplayTitle() {
    this.log.info("tc1_PageContent_DisplayTitle");
    // Wait for title become visible and with value 'Community Dashboard Framework'
    wait.until(ExpectedConditions.titleContains("Community Dashboard Framework"));
    // Wait for visibility of 'VisualizationAPIComponent'
    wait.until(ExpectedConditions
            .visibilityOfElementLocated(By.xpath("//div[@id='dashboardContent']/div/div/div/h2/span[2]")));

    // Validate the sample that we are testing is the one
    assertEquals("Community Dashboard Framework", driver.getTitle());
    assertEquals("jFreeChartComponent", this.elemHelper.WaitForElementPresentGetText(driver,
            By.xpath("//div[@id='dashboardContent']/div/div/div/h2/span[2]")));
}

From source file:com.pentaho.ctools.cdf.MonthPickerComponent.java

License:Apache License

/**
 * ############################### Test Case 1 ###############################
 *
 * Test Case Name:/*  ww  w.  j a  v  a2s . c  o m*/
 *    Reload Sample
 * Description:
 *    Reload the sample (not refresh page).
 * Steps:
 *    1. Click in Code and then click in button 'Try me'.
 */
@Test
public void tc1_PageContent_DisplayTitle() {
    this.log.info("tc1_PageContent_DisplayTitle");
    // Wait for title become visible and with value 'Community Dashboard Framework'
    wait.until(ExpectedConditions.titleContains("Community Dashboard Framework"));
    // Wait for visibility of 'VisualizationAPIComponent'
    wait.until(ExpectedConditions
            .visibilityOfElementLocated(By.xpath("//div[@id='dashboardContent']/div/div/div/h2/span[2]")));

    // Validate the sample that we are testing is the one
    assertEquals("Community Dashboard Framework", driver.getTitle());
    assertEquals("MonthPickerComponent", this.elemHelper.WaitForElementPresentGetText(driver,
            By.xpath("//div[@id='dashboardContent']/div/div/div/h2/span[2]")));
}

From source file:com.pentaho.ctools.cdf.MultiButtonComponent.java

License:Apache License

/**
 * ############################### Test Case 1 ###############################
 *
 * Test Case Name:/*from w ww  .j av a  2 s.c om*/
 *    Reload Sample
 * Description:
 *    Reload the sample (not refresh page).
 * Steps:
 *    1. Click in Code and then click in button 'Try me'.
 */
@Test
public void tc1_PageContent_DisplayTitle() {
    this.log.info("tc1_PageContent_DisplayTitle");
    // Wait for title become visible and with value 'Community Dashboard Framework'
    wait.until(ExpectedConditions.titleContains("Community Dashboard Framework"));
    // Wait for visibility of 'VisualizationAPIComponent'
    wait.until(ExpectedConditions
            .visibilityOfElementLocated(By.xpath("//div[@id='dashboardContent']/div/div/div/h2/span[2]")));

    // Validate the sample that we are testing is the one
    assertEquals("Community Dashboard Framework", driver.getTitle());
    assertEquals("MultiButtonComponent", this.elemHelper.WaitForElementPresentGetText(driver,
            By.xpath("//div[@id='dashboardContent']/div/div/div/h2/span[2]")));
}