Search in sources :

Example 11 with RunAsClient

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

the class InjectionDroneTest method testConverterWithError.

@Test
@RunAsClient
public void testConverterWithError() throws MalformedURLException {
    driver.get(new URL(contextPath, "testValidatorConverter.xhtml").toString());
    WebElement convertedValue = driver.findElement(By.id("converter:convertedValue"));
    convertedValue.sendKeys("String Value");
    WebElement testConveterButton = driver.findElement(By.id("converter:testConveterButton"));
    testConveterButton.click();
    Assert.assertTrue(ExpectedConditions.textToBePresentInElement(By.id("converter:errorMessage"), "Value is not an Integer").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 12 with RunAsClient

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

the class InjectionDroneTest method testValidator.

@Test
@RunAsClient
public void testValidator() throws MalformedURLException {
    driver.get(new URL(contextPath, "testValidatorConverter.xhtml").toString());
    WebElement convertedValue = driver.findElement(By.id("validator:stringValue"));
    convertedValue.sendKeys("DeltaSpike");
    WebElement testConveterButton = driver.findElement(By.id("validator:testValidatorButton"));
    testConveterButton.click();
    Assert.assertTrue(ExpectedConditions.textToBePresentInElement(By.id("messages"), "Worked").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 13 with RunAsClient

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

the class InjectionDroneTest method testValidatorWithError.

@Test
@RunAsClient
public void testValidatorWithError() throws MalformedURLException {
    driver.get(new URL(contextPath, "testValidatorConverter.xhtml").toString());
    WebElement convertedValue = driver.findElement(By.id("validator:stringValue"));
    convertedValue.sendKeys("Wrong Value");
    WebElement testConveterButton = driver.findElement(By.id("validator:testValidatorButton"));
    testConveterButton.click();
    Assert.assertTrue(ExpectedConditions.textToBePresentInElement(By.id("validator:errorMessage"), "The valid value should be DeltaSpike").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 14 with RunAsClient

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

the class ViewConfigTestDrone method testNavigationActionMethod2.

@Test
@RunAsClient
public void testNavigationActionMethod2() throws MalformedURLException {
    driver.get(new URL(contextPath, "origin.xhtml").toString());
    WebElement button = driver.findElement(By.id("destination:pb003ActionMethod2"));
    button.click();
    Assert.assertTrue(ExpectedConditions.textToBePresentInElement(By.id("homePage"), "You arrived at home 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 15 with RunAsClient

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

the class ViewConfigTestDrone method testNavigationActionMethod2.

@Test
@RunAsClient
public void testNavigationActionMethod2() throws MalformedURLException {
    driver.get(new URL(contextPath, "origin.xhtml").toString());
    WebElement button = driver.findElement(By.id("destination:pb004ActionMethod2"));
    button.click();
    Assert.assertTrue(ExpectedConditions.textToBePresentInElement(By.id("overviewPage"), "You arrived at overview 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)

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