Creating an org.apache.tapestry5.dom.Document from client-side page source

2017-04-06 Thread Davide Vecchi
Hi everybody I am writing a Selenium test to test a Tapestry 5.3.8 web app, and in that test I retrieved the whole client-side page source into a String. It's a regular HTML page generated by Tapestry. Nothing special about it, it starts with http://www.w3.org/1999/xhtml";> and it ends wi

Re: Creating an org.apache.tapestry5.dom.Document from client-side page source

2017-04-06 Thread Lance Java
Why on earth would you do that? On 6 Apr 2017 16:20, "Davide Vecchi" wrote: Hi everybody I am writing a Selenium test to test a Tapestry 5.3.8 web app, and in that test I retrieved the whole client-side page source into a String. It's a regular HTML page generated by Tapestry. Nothing special a

RE: Creating an org.apache.tapestry5.dom.Document from client-side page source

2017-04-06 Thread Davide Vecchi
I'm not sure what exactly is so surprising, anyway if you mean why I want to test in that way, it's because the test must fail if certain texts are present anywhere in the page except for a certain div where their possible presence must be ignored. So I thought removing that div from the DOM and

Re: Creating an org.apache.tapestry5.dom.Document from client-side page source

2017-04-06 Thread Thiago H. de Paula Figueiredo
Isn't this scenario better suited for a web testing tool like Selenium or WebDriver? If you really, really want to parse HTML into Tapestry DOM elements, you can use the nu.validator.htmlparser library, which parses HTML using HTML5 rules and presents itself as a SAX parser. You'll need to subclas

RE: Creating an org.apache.tapestry5.dom.Document from client-side page source

2017-04-06 Thread Davide Vecchi
Thanks Thiago, I will look into your suggestion, I actually think htmlparser is even already used somewhere else in the application. I'm actually using Selenium WebDriver, and it's true, it's beautifullly suited for this. -Original Message- From: Thiago H. de Paula Figueiredo [mailto:th

RE: Creating an org.apache.tapestry5.dom.Document from client-side page source

2017-04-06 Thread Lance Java
Typically you'd use the tapestry dom only in production code (pages, components, mixins etc) For verifying html in selenium tests you'd usually use Jsoup or geb or something or maybe even the java xml libraries. But not the tapestry dom libraries. On 6 Apr 2017 17:16, "Davide Vecchi" wrote: >

RE: Creating an org.apache.tapestry5.dom.Document from client-side page source

2017-04-06 Thread Davide Vecchi
OK, I did not know that about the Tapestry DOM libraries. That explains a few things, and it settles this, I will use something else. Thanks for the help. -Original Message- From: Lance Java [mailto:lance.j...@googlemail.com] Sent: Thursday, April 6, 2017 18:21 To: Tapestry users Subj

RE: Creating an org.apache.tapestry5.dom.Document from client-side page source

2017-04-06 Thread Lance Java
Selenium has many features for verifying values in the clientside DOM by xpath and other selectors. Best to look at some selenium tutorials first On 6 Apr 2017 17:26, "Davide Vecchi" wrote: > OK, I did not know that about the Tapestry DOM libraries. That explains a > few things, and it settles t

Fwd: Mouse tracking with Tapestry

2017-04-06 Thread Phyambre
Hi, I would like to do mouse tracking with tapestry (know the coordinates of the mouse, the path of the DOM tree to the element that is being pointed and the text of that element). Currently I have a solution that works, but I think it is terribly inefficient and I hope you can make any suggestio

Re: Mouse tracking with Tapestry

2017-04-06 Thread JumpStart
I’ll answer it this way: http://jumpstart.doublenegative.com.au/jumpstart7/examples/navigation/onactivateandonpassivate/3 Hope this helps, Geoff > On 7 Apr 2017, at 2:07 PM, Phyambre w

Re: Mouse tracking with Tapestry

2017-04-06 Thread Daniel Jue
Hi, I'm not sure this is what you need, but here is a library we used during a DARPA program to collect UI statistics including hovering, etc: https://github.com/draperlaboratory/User-ALE On the browser side it's fire and forget, and there is a separate server set up to collect the stats informati