Access to text nodes

36 vistas
Ir al primer mensaje no leído

jeff

no leída,
30 oct 2008, 6:02:52 p.m.30/10/08
para webdriver
Is there any plan to allow access to text nodes in the DOM? For
example, I want to get a 'WebNode' type interface to the "free text"
in the document below.

<body>
<div>
<a>link</a>
free text
<a>other link</a>
</div>
</body>

Thanks
-Jeff

Simon Stewart

no leída,
2 nov 2008, 5:23:27 p.m.2/11/08
para webd...@googlegroups.com
Hi Jeff,

There is currently no plan to give this level of access to the DOM
through the webdriver interfaces. What are you trying to do? Could you
get the content of the div and call "getText" on that, checking to see
whether an expected string is present within the returned value?

Regards,

Simon

Jeff Yee

no leída,
3 nov 2008, 2:30:25 p.m.3/11/08
para webd...@googlegroups.com
Hey Simon, I am trying to determine whether or not an element contains text which will rendered outside of other elements (like links).   Since the enclosing div's getText() will contain both the text from the links as well as the regular text, it would be a kludge to get the text from the parent and then subtract the text of children elements to see what is remaining.

I can do it in javascript, though its obviously slower.

jeff

Mirko Friedenhagen

no leída,
24 nov 2008, 6:56:50 p.m.24/11/08
para webdriver
On Nov 2, 11:23 pm, "Simon Stewart" <simon.m.stew...@gmail.com> wrote:
> Hi Jeff,
>
> There is currently no plan to give this level of access to the DOM
> through the webdriver interfaces. What are you trying to do? Could you
> get the content of the div and call "getText" on that, checking to see
> whether an expected string is present within the returned value?

Hello Simon,

I would like to use webdriver with qooxdoo.sf.net, testing would be a
lot easier if we could access the DOM for this. See
http://wiki.seleniumhq.org/display/SEL/qooxdooExtension

Regards
Mirko

Simon Stewart

no leída,
27 nov 2008, 7:32:46 p.m.27/11/08
para webd...@googlegroups.com
Hi Mirko,

We offer some basic DOM navigation functions within WebDriver as it
stands: just call "findElement" or "findElements" on an existing
WebElement to access nodes underneath it. We currently only model
actual element objects because this is what people interact with when
using the browser. One of the design goals of WebDriver is to follow
as closely as possible what a user would do when interacting with the
browser.

The interesting tension in developing a framework like WebDriver (and,
I assume Qooxdoo) is between what's technically possible, and which
features hit the sweet-spot between complexity (either of usage or
implemenation) and capability. "Access to the DOM' is already there,
to some extent, but I'd love to hear what feature is missing and how
it can help our users do their testing. Your thoughts and suggestions
would be greatly appreciated.

Regards,

Simon
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos