On Friday, November 9, 2012 1:20:46 AM UTC-8, Nicolas wrote:

> Hi, thanks for your answer,
>
> but unfortunately, it doesn't work.
>

Then try it with the next Div out, perhaps that is the one that is reacting 
to keystrokes

browser.div(:class => "yui3-tagswidget").send_keys "some text"

It would be best if 'some text' was the first few characters of a tag known 
by the system. (if my guess as to how this control might work is correct, 
you may have to first send a few characters, ) 

What it looks like you have here is some kind of a 'widget' for doing 'tag' 
selection using the "YUI3" library http://yuilibrary.com/projects/yui3  
Unfortunately I cannot seem to find any example anywhere online that 
actually implements this control on a page (so we'd have something to try 
working with to figure out what might work).  The only examples I can find 
on that site or elsewhere dealing with tags use an Input element, and look 
very little like what you show above for the HTML

FYI: based on the ID values, the site you are testing is using version 3.3 
of YUI3, which will be two years old in two months.  The examples that are 
up online are all the current version 3.7 of YUI3.  This also makes it a 
bit trickier for us to assist you, since any examples we are able to find 
would likely be based on the current version of that library, not the two 
year old release. 

That means unless you can point us to a publically available page that 
implements this control, that we are pretty much flying blind in terms of 
telling you how to work with it.  We can make guesses, and you can try 
stuff, but that's about it.   (btw: dealing with these sort of javascript 
based custom controls is an issue common to doing web UI automation, no 
matter what tool you are using.  It's much easier if you can point us to 
a publicly visible page that implements this control) 



> Le jeudi 8 novembre 2012 17:01:43 UTC+1, Željko Filipin a écrit :
>>
>> On Thu, Nov 8, 2012 at 4:44 PM, Nicolas <[email protected]> wrote:
>> > As you can't see, the deeper div is a js text field with autocompletion 
>> etc
>> > But I don't manage to set anything in it with Watir.
>>
>> Well, you can not actually enter text into div, right?
>>
>> Try this:
>>
>> browser.div(:id => "yui_3_3_0_1_1352386979117_185365").send_keys "some 
>> text"
>>
>> Željko
>> --
>> filipin.eu 
>>  
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to