Graphene 2.0.0.Alpha4 发布了,Graphene 项目的目的是使用类型安全的 API 进行 Ajax 测试,是 Selenium 项目的扩展。

该版本值得关注的改进有:

Highlighted Changes

Guard Improvements and Fixes
Request Guards were polished, extended and hardened. (read more)

Creating Page Fragments Programatically
Page Fragments can now be instantiated not only using dependency injection, but also programatically. (read more)

PhantomJS Support
You can now fully leverage awesomness of headless testing with PhantomJS.

Guarding Programatically Retrieved Elements
Elements retrieved programatically using WebElement#findElement(...) or WebElement#findElements(...) are now guarded against StaleElementReferenceException.

Automatic Inference of Locators
You no longer need to define a locator in simple forms – you can leverage their automatic inference from a injection point name. (read more)

Dependency Injection of SessionStorage and LocalStorage
These resources are now exposed directly via @ArquillianResource.

Dependency Injection of Selenium Resource Parametrized by WebElement
Selenium resources which takes WebElement as an argument in a constructor (e.g. Select) can be injected using FindBy.

Support for FindBys and FindBy(How, String)

Improved Integration with Drone
Drone 1.2.0.Alpha2’s new Enhancer API allow us to integrate with Drone seamlessly.

Deprecations

Deprecation of Old Variant of Waiting Fluent API
Graphene.element(...) and Graphene.attribute(...) are now deprecated and they will be removed in an upcoming releases.

Deprecated guardXhr replaced by guardAjax
Not all of us are familiar with abbreviation XHR (XMLHttpRequest). In order to make the API more clear for most of Graphene users, we have deprecated guardXhr and replaced it with guardAjax. guardXhr will be removed in upcoming releases.

Guard Improvements and Fixes

waitForHttp
When an Ajax request is followed by a relocation (HTTP request), guardXhr or guardHttp can’t deterministically wait for an end of a request – in these situations you can use waitForHttp instead.

Testing delayed requests
Guards now waits for a given time interval for a request to start and once the request is started, they wait the another interval for the request to finish.

Bug Fixes
Guards had problems on Android with deterministic waiting for HTTP requests.

Creating Page Fragments Programatically

Till this release, the only option to create a page fragment was injecting it:

@FindBy(...)MyComponent component;

With Alpha4 we have added the possibility to create a page fragment programatically:

public  T getContent(Class clazz) {return PageFragmentEnricher.createPageFragment(clazz, root);}
@Testpublic void testTabPanelSwitching() {Panel tab3 = tabPanel.switchTo(2);ContentOfTab content = tab3.getContent(ContentOfTab.class);assertEquals("The tab panel was not switched to third tab correctly!", "Content of the tab 3", content.text.getText());Panel tab1 = tabPanel.switchTo(0);content = tab1.getContent(ContentOfTab.class);assertEquals("The tab panel was not switched to first tab correctly!", "Content of the tab 1", content.text.getText());}

You can find reference usage in this functional test together with an implementation of #getContent(Class).

Automatic Inference of Locators

How many times you have written:

// look for input with a name 'firstname'@FindBy(name = "firstname")private WebElement firstname;

You can now simplify your tests to just

@FindByprivate WebElement firstname;

Graphene will automatically use the strategy How.ID_OR_NAME to locate the element by its ID or name.

Since this mechanism uses the strategy pattern, you can overwrite the default strategy for your test suite and therefore find elements by e.g. their class names or even JSF component IDs.

Roadmap

This release is a maintanance release on the way to Beta1.

What is Arquillian?

Arquillian is open source software that empowers you to test JVM-based applications more effectively. Created to defend the software galaxy from bugs, Arquillian brings your test to the runtime so you can focus on testing your application's behavior rather than managing the runtime. Using Arquillian, you can develop a comprehensive suite of tests from the convenience of your IDE and run them in any IDE, build tool or continuous integration environment.

Release details


Published artifacts org.jboss.arquillian.graphene

  • org.jboss.arquillian.graphene » graphene-build-resources jar pom
  • org.jboss.arquillian.graphene » graphene-component-api jar pom
  • org.jboss.arquillian.graphene » graphene-selenium-api jar pom
  • org.jboss.arquillian.graphene » graphene-selenium-drone jar pom
  • org.jboss.arquillian.graphene » graphene-selenium-ftest-junit-container jar pom
  • org.jboss.arquillian.graphene » graphene-selenium-ftest-junit-standalone jar pom
  • org.jboss.arquillian.graphene » graphene-selenium-ftest-testng-container jar pom
  • org.jboss.arquillian.graphene » graphene-selenium-ftest-testng-standalone jar pom
  • org.jboss.arquillian.graphene » graphene-selenium-impl jar pom
  • org.jboss.arquillian.graphene » graphene-webdriver-ftest jar pom
  • org.jboss.arquillian.graphene » graphene-webdriver-impl jar pom
  • org.jboss.arquillian.graphene » graphene-webdriver-spi jar pom

Release notes and resolved issues 20

Q1/13: PhantomJS

Bug

  • ARQGRA-257 - Guards are not working with AndroidDriver
  • ARQGRA-262 - Element click with HTTP guard causes WebDriverException: ReferenceError: Graphene is not defined
  • ARQGRA-266 - Waiting for presence of element defined by jQuery selector sometimes causes "IllegalStateException: JQueryPageExtension can't be installed"
  • ARQGRA-272 - Introduced waitForHttp (guardXhr does not work for redirected pages)
  • ARQGRA-274 - The request guard does timeout for delayed requests
  • ARQGRA-289 - JavaScript interfaces fails on Chrome and PhantomJS
  • ARQGRA-290 - testAttributeIsPresent fails on Chrome and PhantomJS

Enhancement

  • ARQGRA-199 - Provide a way to create Page Fragments dynamically
  • ARQGRA-235 - Automatically infer ID locator from field name annotated just by @FindBy
  • ARQGRA-250 - Shortcut for waiting on element's attribute value

Feature Request

  • ARQGRA-220 - Locating elements with @FindBy(how = How.ID, using = "foobar") not working
  • ARQGRA-247 - Add support for enriching @FindBys annotations
  • ARQGRA-254 - Expose LocalStorage and SessionStorage enrichments directly
  • ARQGRA-258 - Provide injecting classes requiring WebElement in their constructors via @FindBy annotation
  • ARQGRA-259 - Provide timeout setting in fluent API
  • ARQGRA-273 - Intercept WebDriver to return proxies in findElement()/findElements() methods

Story

  • ARQGRA-286 - Support PhantomJSDriver in Graphene

Task

  • ARQGRA-168 - Create QUnit tests for Graphene.Page.RequestGuard.js
  • ARQGRA-284 - Rename guardXhr to guardAjax
  • ARQGRA-287 - Deprecate Graphene.element and attribute methods

Graphene 2.0.0.Alpha4,Selenium 的 Ajax 测试扩展相关推荐

  1. php ajax弹出框传值,PHP_Yii2.0 模态弹出框+ajax提交表单,如题 我们使用模态弹出框+ajax - phpStudy...

    Yii2.0 模态弹出框+ajax提交表单 如题 我们使用模态弹出框+ajax提交表单 首先我们把index视图的create按钮添加data-toggle 和 data-target. 代码如下: ...

  2. 在localhost和本地服务器(127.0.0.1)中使用ajax发起post请求遇到的问题。

    首先 用ajax访问本地json文件时,应该使用get方法,而不是post.json算静态文件,一般不支持post请求 $.ajax({type: "POST",url: &quo ...

  3. glassfish发布应用_Arquillian 1.0.0.Final正式发布! 准备使用GlassFish和WebLogic! 所有虫子死亡!...

    glassfish发布应用 红帽公司和JBoss社区今天宣布的1.0.0.Final发布的Arquillian ,其屡获殊荣的建在Java虚拟机(JVM)运行测试平台. Arquillian大大减少了 ...

  4. Arquillian 1.0.0.Final正式发布! 准备使用GlassFish和WebLogic! 杀死所有虫子!

    红帽公司和JBoss社区今天宣布的1.0.0.Final发布的Arquillian ,其屡获殊荣的建在Java虚拟机(JVM)运行测试平台. Arquillian大大减少了编写和执行Java中间件集成 ...

  5. Fluorida 0.0.1发布了!

    Fluorida 0.0.1发布了! 版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明 http://dreamhead.blogbus.com/logs/16533990.html ...

  6. Apache简单配置(4)搭建Discuz 7.0.0论坛

    Apache简单配置(4)搭建Discuz 7.0.0论坛 RHEL5.3 基本网络配置 一. 1.RHEL5 U3:如图1 (如图1) 2.#hostname //查看当前主机的主机名:如图2 (如 ...

  7. 关于http://127.0.0.1:4723/wd/hub的解释

    127.0.0.1(127.0.0.1是环回(loopback)地址)和localhost( localhost是个域名,性质跟 "www.baidu.com" 差不多,也就是说你 ...

  8. Could not load file or assembly 'System.Web.Extensions, Version=3.5.0.0

    前些天发现这个问题的,本来原有的项目是用VS2005开发的,后来装了VS2008,没想到问题就来了. 原项目是ASP.NET 2.0,用到了Ajax Extension,.NET 2.0用的Ajax ...

  9. FastAdmin 极速后台管理框架(三周年)V1.0.0.20190410_beta

    开发四年只会写业务代码,分布式高并发都不会还做程序员? >>>   FastAdmin 极速后台框架(三周年)V1.0.0.20190410_beta FastAdmin 三周岁了, ...

  10. 错误 1 类型“System.Web.UI.ScriptManager”同时存在于“c:\windows\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0

    vs.net 2008中建ajax,调试时出现错误: 错误1 类型"System.Web.UI.ScriptManager"同时存在于"c:\windows\assemb ...

最新文章

  1. svm对未知数据的分类_基于SVM的高维不平衡数据分类方法与流程
  2. rabbitMQ、activeMQ、zeroMQ、Kafka、Redis 比较
  3. 基于ffmpeg和libvlc的视频剪辑、播放器
  4. 1024,阿里云惊喜 “加油包” 让你 “猿” 力觉醒!
  5. C++喜欢收录和反链都保持增长的态势
  6. css上传图片中等待不可点击效果
  7. 30 张快速学习 Java 的思维导图
  8. 如何卸载2345soft文件夹
  9. mini usb 接口定义 5针usb接口定义图
  10. Objective-C 信息传递模型 [ ] 发送消息
  11. VARCHART XGantt 应用程序支持简介
  12. 关于URL中带空格的问题
  13. 微信中各种代码/符号合集
  14. 如何查看mysql的gtid_mode_配置MHA开启主从同步的时候会提示从库gtid_mode为ON的状态...
  15. untiy下连接photon
  16. select函数使用方法
  17. 所有的环境都配置好了,将新创建的weex项目导入到Android studio中的时候,出现的错误。...
  18. 【实习之路】投了109份简历,幸运的大二菜鸡终于拿到欢聚时代的offer了!!
  19. java模拟内存溢出并分析_本地模拟内存溢出并分析Dump文件
  20. Android Studio项目在安卓手机上模拟

热门文章

  1. IXI数据预处理 + Linux + freesurfer
  2. excel小写转大写公式_不要眨眼!中英文、大小写转换,一秒就搞定!
  3. 均值、均方值、方差、均方差和协方差概念及其物理意义
  4. 牛逼!你竟然把VSCode玩成了IDEA的效果,有点哇塞。。。
  5. 重磅福利 | 知乎上赞同数最高的1000个回答2019最新版
  6. 北京驾驶证期满换证(2021-06)
  7. 在线ps,修改证件照背景色
  8. sql server 2008 mdf文件太大
  9. python第三方库 invalid requirement_python第三方库安装出问题
  10. 利用pdfbox和itext包将pdf转换为图片