• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Graphene类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: openGooglePageTest

import org.jboss.arquillian.graphene.Graphene; //导入依赖的package包/类
@Test
public void openGooglePageTest() {
    browser.get("http://www.google.com");

    Graphene.waitAjax().until().element(bigLogo).is().visible();
    input.sendKeys("arquillian drone");

    Graphene.waitAjax().until().element(smallLogo).is().visible();
}
 
开发者ID:MatousJobanek,项目名称:examples,代码行数:10,代码来源:GoogleUITest.java


示例17: login

import org.jboss.arquillian.graphene.Graphene; //导入依赖的package包/类
@Test
@InSequence(1)
public void login() throws InterruptedException {
    driver.get(contextPath.toString() + "form.html");
    usernameField.sendKeys(USERNAME);
    passwordField.sendKeys(PASSWORD);
    loginButton.click();
    Graphene.waitAjax().until().element(loginStatus).text().contains("User logged in!");
}
 
开发者ID:MatousJobanek,项目名称:examples,代码行数:10,代码来源:BrowserStackLocalWebDriverTest.java


示例18: submitRegistrationForm

import org.jboss.arquillian.graphene.Graphene; //导入依赖的package包/类
private void submitRegistrationForm(String userName, String s_name,
		String s_password) {
	clearFields();
	username.sendKeys(userName);
	name.sendKeys(s_name);
	password.sendKeys(s_password);
	Graphene.guardHttp(register).click();
}
 
开发者ID:seam2,项目名称:seam-examples-migrated-off-seam2,代码行数:9,代码来源:RegistrationFunctionalTest.java


示例19: setContent

import org.jboss.arquillian.graphene.Graphene; //导入依赖的package包/类
public void setContent(String petName, Date petBirthDate, String petType){
    this.petName.sendKeys(petName);
    DateTime dateTime = new DateTime(petBirthDate.getTime());
    this.petBirthDate.setDate(dateTime);
    List<WebElement> options = this.petType.findElements(By.tagName("option"));
    for(WebElement option: options){
        if(option.getText().contentEquals(petType)){
            option.click();
            break;
        }
    }
    Graphene.guardHttp(add).click();
}
 
开发者ID:phasenraum2010,项目名称:javaee7-petclinic,代码行数:14,代码来源:NewPetPage.java


示例20: setNewContent

import org.jboss.arquillian.graphene.Graphene; //导入依赖的package包/类
public void setNewContent(Date visitDate, String description) {
    DateTime dateTime = new  DateTime(visitDate.getTime());
    Graphene.waitModel().until().element(addVisitForm).is().visible();
    this.visitDescription.sendKeys(description);
    this.visitDate.setDate(dateTime);
    Graphene.guardHttp(save).click();
}
 
开发者ID:phasenraum2010,项目名称:javaee7-petclinic,代码行数:8,代码来源:NewVisitPage.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java POASystemException类代码示例发布时间:2022-05-22
下一篇:
Java VariableSizeSet类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap