Search in sources :

Example 16 with RunAsClient

use of org.jboss.arquillian.container.test.api.RunAsClient in project deltaspike by apache.

the class ViewConfigTestDrone method testNavigationActionMethod.

@Test
@RunAsClient
public void testNavigationActionMethod() throws MalformedURLException {
    driver.get(new URL(contextPath, "origin.xhtml").toString());
    WebElement button = driver.findElement(By.id("destination:pb004ActionMethod"));
    button.click();
    Assert.assertTrue(ExpectedConditions.textToBePresentInElement(By.id("indexPage"), "You arrived at index page").apply(driver));
}
Also used : WebElement(org.openqa.selenium.WebElement) URL(java.net.URL) RunAsClient(org.jboss.arquillian.container.test.api.RunAsClient) Test(org.junit.Test)

Example 17 with RunAsClient

use of org.jboss.arquillian.container.test.api.RunAsClient in project deltaspike by apache.

the class ViewConfigTestDrone method testNavigationActionMethod.

@Test
@RunAsClient
public void testNavigationActionMethod() throws MalformedURLException {
    driver.get(new URL(contextPath, "origin.xhtml").toString());
    WebElement button = driver.findElement(By.id("destination:pb001ActionMethod"));
    button.click();
    Assert.assertTrue(ExpectedConditions.textToBePresentInElement(By.id("indexPage"), "You arrived at index page").apply(driver));
}
Also used : WebElement(org.openqa.selenium.WebElement) URL(java.net.URL) RunAsClient(org.jboss.arquillian.container.test.api.RunAsClient) Test(org.junit.Test)

Example 18 with RunAsClient

use of org.jboss.arquillian.container.test.api.RunAsClient in project deltaspike by apache.

the class ViewConfigTestDrone method testNavigationActionWithError.

@Test
@RunAsClient
public void testNavigationActionWithError() throws MalformedURLException {
    driver.get(new URL(contextPath, "origin.xhtml").toString());
    WebElement button = driver.findElement(By.id("destination:pb002ActionWithError"));
    button.click();
    Assert.assertTrue(ExpectedConditions.textToBePresentInElement(By.id("customErrorPage"), "This is a custom error page").apply(driver));
}
Also used : WebElement(org.openqa.selenium.WebElement) URL(java.net.URL) RunAsClient(org.jboss.arquillian.container.test.api.RunAsClient) Test(org.junit.Test)

Example 19 with RunAsClient

use of org.jboss.arquillian.container.test.api.RunAsClient in project deltaspike by apache.

the class ViewConfigTestDrone method testNavigationActionWithoutError.

@Test
@RunAsClient
public void testNavigationActionWithoutError() throws MalformedURLException {
    driver.get(new URL(contextPath, "origin.xhtml").toString());
    WebElement button = driver.findElement(By.id("destination:pb002ActionWithoutError"));
    button.click();
    Assert.assertTrue(ExpectedConditions.textToBePresentInElement(By.id("overviewPage"), "You arrived at overview page").apply(driver));
    // Was redirected ?
    Assert.assertTrue(driver.getCurrentUrl().contains("overview.xhtml"));
}
Also used : WebElement(org.openqa.selenium.WebElement) URL(java.net.URL) RunAsClient(org.jboss.arquillian.container.test.api.RunAsClient) Test(org.junit.Test)

Example 20 with RunAsClient

use of org.jboss.arquillian.container.test.api.RunAsClient in project deltaspike by apache.

the class NavigationParameterTest method testNavigationActionWithParameter.

@Test
@RunAsClient
public void testNavigationActionWithParameter() throws MalformedURLException {
    //first click
    driver.get(new URL(contextPath, "origin.xhtml").toString());
    WebElement button = driver.findElement(By.id("parameter:pb004ActionMethod"));
    button.click();
    //second click
    driver.get(new URL(contextPath, "origin.xhtml").toString());
    button = driver.findElement(By.id("parameter:pb004ActionMethod"));
    button.click();
    Assert.assertTrue(ExpectedConditions.textToBePresentInElement(By.id("simplePageConfig"), "You arrived at simplePageConfig page").apply(driver));
    Assert.assertTrue(driver.getCurrentUrl().contains("cv="));
}
Also used : WebElement(org.openqa.selenium.WebElement) URL(java.net.URL) RunAsClient(org.jboss.arquillian.container.test.api.RunAsClient) Test(org.junit.Test)

Aggregations

RunAsClient (org.jboss.arquillian.container.test.api.RunAsClient)62 Test (org.junit.Test)61 URL (java.net.URL)49 WebElement (org.openqa.selenium.WebElement)34 QName (javax.xml.namespace.QName)9 Service (javax.xml.ws.Service)9 Bus (org.apache.cxf.Bus)9 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)9 WrapThreadContextClassLoader (org.jboss.as.test.integration.ws.WrapThreadContextClassLoader)9 IOException (java.io.IOException)6 ActAsServiceIface (org.jboss.as.test.integration.ws.wsse.trust.actas.ActAsServiceIface)6 OnBehalfOfServiceIface (org.jboss.as.test.integration.ws.wsse.trust.onbehalfof.OnBehalfOfServiceIface)6 HttpResponse (org.apache.http.HttpResponse)5 HttpGet (org.apache.http.client.methods.HttpGet)5 ServiceIface (org.jboss.as.test.integration.ws.wsse.trust.service.ServiceIface)5 ModelNode (org.jboss.dmr.ModelNode)5 InSequence (org.jboss.arquillian.junit.InSequence)4 Response (javax.ws.rs.core.Response)3 HashMap (java.util.HashMap)2 Hashtable (java.util.Hashtable)2