com.xyxy.platform.examples.showcase.functional.ajax.AjaxFT.java Source code

Java tutorial

Introduction

Here is the source code for com.xyxy.platform.examples.showcase.functional.ajax.AjaxFT.java

Source

/*******************************************************************************
 * Copyright (c) 2005, 2014
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.xyxy.platform.examples.showcase.functional.ajax;

import static org.assertj.core.api.Assertions.*;

import com.xyxy.platform.examples.showcase.functional.BaseSeleniumTestCase;
import org.junit.Test;
import org.openqa.selenium.By;

/**
 * Ajax Mashup.
 * 
 * @calvin
 */
public class AjaxFT extends BaseSeleniumTestCase {

    @Test
    public void mashup() {
        s.open("/");
        s.click(By.linkText("Web"));
        s.click(By.linkText("??Mashup"));

        s.click(By.xpath("//input[@value='?']"));
        s.waitForVisible(By.id("mashupContent"));
        assertThat(s.getText(By.id("mashupContent"))).isEqualTo("?");
    }
}