How to access PrimeFaces components through Graphene in the most portable way?

▼魔方 西西 提交于 2019-12-04 05:48:59

问题


I'm writing Arquillian+Graphene functional tests for a Java EE web client with Primefaces 6.1 components and would like to write them in the most portable way from the beginning.

I noticed that there's no possibility to perform operations like WebElement.click on any PrimeFaces component which is clickable (e.g. not on p:selectBooleanCheckbox since the WebElement is a div containing another div containing an input), so that I have to

  • figure out how a clickable component is structured for every component and access it via XPath
  • figure the above out for every component after I change the PrimeFaces version

A similar problem is the case for access by id: the clickable element seems to be suffixed with _input, but that's probably as non-portable as the element hierarchy described above.

How to avoid as many problems listed above as possible? Or more abstract: How do people test PrimeFaces components?

The only answer to PrimeFaces fileUpload testing with Selenium WebDriver is proposing my problem as a solution.

来源:https://stackoverflow.com/questions/46765542/how-to-access-primefaces-components-through-graphene-in-the-most-portable-way

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!