当前位置: 首页>>代码示例>>Java>>正文


Java Graphene类代码示例

本文整理汇总了Java中org.jboss.arquillian.graphene.Graphene的典型用法代码示例。如果您正苦于以下问题:Java Graphene类的具体用法?Java Graphene怎么用?Java Graphene使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Graphene类属于org.jboss.arquillian.graphene包,在下文中一共展示了Graphene类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: editContent

import org.jboss.arquillian.graphene.Graphene; //导入依赖的package包/类
public void editContent(String firstName,
                        String lastName,
                        String address,
                        String city,
                        String telephone) {
    this.firstName.clear();
    this.lastName.clear();
    this.address.clear();
    this.city.clear();
    this.telephone.clear();
    this.firstName.sendKeys(firstName);
    this.lastName.sendKeys(lastName);
    this.address.sendKeys(address);
    this.city.sendKeys(city);
    this.telephone.sendKeys(telephone);
    Graphene.guardHttp(this.save).click();
}
 
开发者ID:phasenraum2010,项目名称:javaee7-petclinic,代码行数:18,代码来源:EditOwnerPage.java

示例2: testTimeout

import org.jboss.arquillian.graphene.Graphene; //导入依赖的package包/类
@Test
@RunAsClient
@InSequence(20)
public void testTimeout(@ArquillianResource URL url) throws Exception {
    // 1. Create our test with a unique channel id.
    final String channelId = "" + System.currentTimeMillis();

    // Set timeout for 1 minute.
    String params = String.format("/channelPage.jsp?test-channel-id=%s&timeout-minutes=%d", channelId, 1);
    driver.get(url + params);

    // 2. Verify that the server received our channel id and is using it for this tests.
    WebElement channel = driver.findElement(By.id("channel-id"));
    assertEquals(channelId, channel.getText());

    // 3. Verify that the channel gets closed after the 1 minute timeout.
    Graphene.waitModel(driver).until().element(By.id("status")).text().equalTo("opened");

    // This should put us over the 1 minute timeout.
    Graphene.waitModel(driver).withTimeout(90, TimeUnit.SECONDS).until().element(By.id("status")).text().equalTo("closed");
}
 
开发者ID:GoogleCloudPlatform,项目名称:appengine-tck,代码行数:22,代码来源:ChannelTest.java

示例3: testRpc

import org.jboss.arquillian.graphene.Graphene; //导入依赖的package包/类
@Test
@RunAsClient
public void testRpc(@ArquillianResource URL url) throws Exception {
    driver.get(url.toExternalForm());

    WebElement getButton = driver.findElement(By.id("getButton"));
    Graphene.waitModel(driver).until().element(getButton).is().enabled();
    getButton.click();

    final WebElement response = driver.findElement(By.id("response"));
    Graphene.waitModel(driver).until(new Predicate<WebDriver>() {
        public boolean apply(WebDriver input) {
            return response.getText().length() > 0;
        }
    });
}
 
开发者ID:GoogleCloudPlatform,项目名称:appengine-tck,代码行数:17,代码来源:RpcTest.java

示例4: testSecuredResource

import org.jboss.arquillian.graphene.Graphene; //导入依赖的package包/类
@Test
public void testSecuredResource() throws InterruptedException {
    try {
        indexPage.clickSecured();
        assertTrue(Graphene.waitGui().until(ExpectedConditions.textToBePresentInElementLocated(By.className("error"), UNAUTHORIZED)));
    } catch (Exception e) {
        fail("Should display an error message");
    }
}
 
开发者ID:nmajorov,项目名称:keycloak_training,代码行数:10,代码来源:ArquillianJeeJspTest.java

示例5: testAdminResource

import org.jboss.arquillian.graphene.Graphene; //导入依赖的package包/类
@Test
public void testAdminResource() {
    try {
        indexPage.clickAdmin();
        assertTrue(Graphene.waitGui().until(ExpectedConditions.textToBePresentInElementLocated(By.className("error"), UNAUTHORIZED)));
    } catch (Exception e) {
        fail("Should display an error message");
    }
}
 
开发者ID:nmajorov,项目名称:keycloak_training,代码行数:10,代码来源:ArquillianJeeJspTest.java

示例6: testPublicResource

import org.jboss.arquillian.graphene.Graphene; //导入依赖的package包/类
@Test
public void testPublicResource() {
    try {
        indexPage.clickPublic();
        assertTrue(Graphene.waitGui().until(ExpectedConditions.textToBePresentInElementLocated(By.className("message"), MESSAGE_PUBLIC)));
    } catch (Exception e) {
        fail("Should display an error message");
    }
}
 
开发者ID:nmajorov,项目名称:keycloak_training,代码行数:10,代码来源:ArquillianJeeJspTest.java

示例7: testAdminWithAuthAndRole

import org.jboss.arquillian.graphene.Graphene; //导入依赖的package包/类
@Test
public void testAdminWithAuthAndRole() throws MalformedURLException, InterruptedException {
    try {
        indexPage.clickLogin();
        loginPage.login("test-admin", "password");
        indexPage.clickAdmin();
        assertTrue(Graphene.waitGui().until(ExpectedConditions.textToBePresentInElementLocated(By.className("message"), MESSAGE_ADMIN)));
        indexPage.clickLogout();
    } catch (Exception e) {
        fail("Should display logged in user");
    }
}
 
开发者ID:nmajorov,项目名称:keycloak_training,代码行数:13,代码来源:ArquillianJeeJspTest.java

示例8: testUserWithAuthAndRole

import org.jboss.arquillian.graphene.Graphene; //导入依赖的package包/类
@Test
public void testUserWithAuthAndRole() throws MalformedURLException, InterruptedException {
    try {
        indexPage.clickLogin();
        loginPage.login("alice", "password");
        indexPage.clickSecured();
        assertTrue(Graphene.waitGui().until(ExpectedConditions.textToBePresentInElementLocated(By.className("message"), MESSAGE_SECURED)));
        indexPage.clickLogout();
    } catch (Exception e) {
        fail("Should display logged in user");
    }
}
 
开发者ID:nmajorov,项目名称:keycloak_training,代码行数:13,代码来源:ArquillianJeeJspTest.java

示例9: testLogin

import org.jboss.arquillian.graphene.Graphene; //导入依赖的package包/类
@Test
public void testLogin() throws InterruptedException {
    try {
        indexPage.clickLogin();
        loginPage.login("test-admin", "password");
        assertTrue(Graphene.waitGui().until(ExpectedConditions.textToBePresentInElementLocated(By.id("username"), "admin")));
        profilePage.clickLogout();
    } catch (Exception e) {
        fail("Should display logged in user");
    }
}
 
开发者ID:nmajorov,项目名称:keycloak_training,代码行数:12,代码来源:ArquillianProfileJeeHtml5Test.java

示例10: testSecuredResource

import org.jboss.arquillian.graphene.Graphene; //导入依赖的package包/类
@Test
public void testSecuredResource() throws InterruptedException {
    try {
        indexPage.clickSecured();
        assertTrue(Graphene.waitGui().until(ExpectedConditions.textToBePresentInElementLocated(By.className("error"), UNAUTHORIZED)));
    } catch (Exception e) {
        debugTest(e);
        fail("Should display an error message");
    }
}
 
开发者ID:nmajorov,项目名称:keycloak_training,代码行数:11,代码来源:ArquillianAngular2Test.java

示例11: testAdminResource

import org.jboss.arquillian.graphene.Graphene; //导入依赖的package包/类
@Test
public void testAdminResource() {
    try {
        indexPage.clickAdmin();
        assertTrue(Graphene.waitGui().until(ExpectedConditions.textToBePresentInElementLocated(By.id("message"), UNAUTHORIZED)));
    } catch (Exception e) {
        debugTest(e);
        fail("Should display an error message");
    }
}
 
开发者ID:nmajorov,项目名称:keycloak_training,代码行数:11,代码来源:ArquillianAngular2Test.java

示例12: testPublicResource

import org.jboss.arquillian.graphene.Graphene; //导入依赖的package包/类
@Test
public void testPublicResource() {
    try {
        indexPage.clickPublic();
        assertTrue(Graphene.waitGui().until(ExpectedConditions.textToBePresentInElementLocated(By.id("message"), MESSAGE_PUBLIC)));
    } catch (Exception e) {
        debugTest(e);
        fail("Should display an error message");
    }
}
 
开发者ID:nmajorov,项目名称:keycloak_training,代码行数:11,代码来源:ArquillianAngular2Test.java

示例13: testAdminWithAuthAndRole

import org.jboss.arquillian.graphene.Graphene; //导入依赖的package包/类
@Test
public void testAdminWithAuthAndRole() throws MalformedURLException, InterruptedException {
    try {
        indexPage.clickLogin();
        loginPage.login("test-admin", "password");
        waitNg2Init();
        indexPage.clickAdmin();
        assertTrue(Graphene.waitGui().until(ExpectedConditions.textToBePresentInElementLocated(By.className("message"), MESSAGE_ADMIN)));
        indexPage.clickLogout();
    } catch (Exception e) {
        debugTest(e);
        fail("Should display logged in user");
    }
}
 
开发者ID:nmajorov,项目名称:keycloak_training,代码行数:15,代码来源:ArquillianAngular2Test.java

示例14: testUserWithAuthAndRole

import org.jboss.arquillian.graphene.Graphene; //导入依赖的package包/类
@Test
public void testUserWithAuthAndRole() throws MalformedURLException, InterruptedException {
    try {
        indexPage.clickLogin();
        loginPage.login("alice", "password");
        waitNg2Init();
        indexPage.clickSecured();
        assertTrue(Graphene.waitGui().until(ExpectedConditions.textToBePresentInElementLocated(By.id("message"), MESSAGE_SECURED)));
        indexPage.clickLogout();
    } catch (Exception e) {
        debugTest(e);
        fail("Should display logged in user");
    }
}
 
开发者ID:nmajorov,项目名称:keycloak_training,代码行数:15,代码来源:ArquillianAngular2Test.java

示例15: browserTest

import org.jboss.arquillian.graphene.Graphene; //导入依赖的package包/类
@Test
public void browserTest() {
    driver.get("http://www.google.com/");
    Graphene.waitAjax().until().element(queryField).is().visible();

    queryField.sendKeys("browserstack");
    queryField.submit();

    Graphene.waitAjax().until().element(searchResult).text().contains("BrowserStack");
}
 
开发者ID:MatousJobanek,项目名称:examples,代码行数:11,代码来源:BrowserStackWebDriverSimpleTest.java


注:本文中的org.jboss.arquillian.graphene.Graphene类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。