Yes, I created a test and see the list size is zero when use Selenium APIs.
But if I add

useTelluriumEngine(true);

The new Tellurium API returns the correct list size 3.

Here is my test code:

    @Test
    public void testGetSListSize(){
        connect("SList");
        useTelluriumEngine(true);
        int size = jlm.getListSize("description");
        System.out.println("List Size " + size);
        useTelluriumEngine(false);
        size = jlm.getListSize("description");
        System.out.println("List Size " + size);
    }

and the console output:

Parse configuration file: TelluriumConfig.groovy from project root directory
Configure UI Object Builders using configuration
Configure widget modules using configuration
Configure event handler using configuration
Configure data accessor using configuration
Configure dispatcher using configuration
Configure Embedded Selenium Server using configuration
Configure Selenium Client using configuration
TE: Name: useEngineLog, start: 1274277970387, duration: 20ms
TE: Name: useEngineLog, start: 1274277970387, duration: 20ms
TE: Found exact match for UI Module 'description':
{"id":"description","relaxDetails":[],"matches":1,"relaxed":false,"score":100.0,"found":true}
TE: Found exact match for UI Module 'description':
{"id":"description","relaxDetails":[],"matches":1,"relaxed":false,"score":100.0,"found":true}
List Size 3
List Size 0
TE: Start Time: 1274277970387
End Time: 1274277970407
Total Runtime: 20ms
Name: useEngineLog, count: 1, total: 20ms, average: 20ms

TE: Start Time: 1274277970387
End Time: 1274277970407
Total Runtime: 20ms
Name: useEngineLog, count: 1, total: 20ms, average: 20ms

Please try to use new Tellurium Engine. I also created an issue for the
getListSize problem

http://code.google.com/p/aost/issues/detail?id=428


Thanks,

Jian

On Wed, May 19, 2010 at 9:35 AM, Jian Fang <[email protected]> wrote:

> I will create a test based on your html snippet and let you know what I
> find.
>
> Thanks,
>
> Jian
>
>
> On Wed, May 19, 2010 at 3:34 AM, super fan 911 <[email protected]>wrote:
>
>> Here is a snippet of my log,
>>
>> 00:18:38.828 INFO - Got result: OK,[{"sequ":
>> 30,"name":"getText","returnType":"STRING","returnResult":"www.yahoo.com
>> \u000awww.google.com\u000awww.youtube.com"}] on session
>> 19c60545e5f34501b5b7104e3ea879c9
>> text = www.yahoo.com
>> www.google.com
>> www.youtube.com
>> 00:18:38.832 INFO - Command request:
>> getBundleResponse[[{"uid":"","args":[],"name":"getAllLinks","sequ":
>> 31}], ] on session 19c60545e5f34501b5b7104e3ea879c9
>> 00:18:38.858 INFO - Got result: OK,[{"sequ":
>> 31,"name":"getAllLinks","returnType":"ARRAY","returnResult":
>>
>> ["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]}]
>> on session 19c60545e5f34501b5b7104e3ea879c9
>> description size = 76
>> 00:18:38.864 INFO - Command request:
>> getBundleResponse[[{"uid":"","args":[],"name":"getAllLinks","sequ":
>> 32}], ] on session 19c60545e5f34501b5b7104e3ea879c9
>> 00:18:38.888 INFO - Got result: OK,[{"sequ":
>> 32,"name":"getAllLinks","returnType":"ARRAY","returnResult":
>>
>> ["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]}]
>> on session 19c60545e5f34501b5b7104e3ea879c9
>>
>>
>>
>> On May 18, 4:58 pm, Jian Fang <[email protected]> wrote:
>> > Hi,
>> >
>> > Container cannot use UI templates since it usually holds fixed elements.
>> You
>> > can use List instead, i.e.,
>> >
>> > ui.List(uid: "description", clocator: [tag: "div", class:
>> > "description"]) {
>> >     UrlLink(uid: "{all}", clocator: [:])
>> >
>> > }
>> >
>> > Then you can use the following method to get back the list size:
>> >
>> > int getListSize(id)
>> >
>> > More details here:
>> >
>> > http://code.google.com/p/aost/wiki/UserGuide070UIObjects#List
>> >
>> > Thanks,
>> >
>> > Jian
>> >
>> > On Tue, May 18, 2010 at 5:50 PM, super fan 911 <[email protected]
>> >wrote:
>> >
>> >
>> >
>> > > I have the following HTML markup.
>> >
>> > > <div class="description">
>> > >   <p>
>> > >      <a target="_blank" href="http://www.yahoo.com";
>> > > rel="nofollow">www.yahoo.com</a><br>
>> > >      <a target="_blank" href="http://www.google.com";
>> > > rel="nofollow">www.google.com</a><br>
>> > >      <a target="_blank" href="http://www.youtube.com";
>> > > rel="nofollow">www.youtube.com</a>
>> > >   </p>
>> > > </div>
>> >
>> > > I have defined the following UI definition.
>> >
>> > > Container(uid: "description", clocator: [tag: "div", class:
>> > > "description"]) {
>> > >     UrlLink(uid: "{all}", clocator: [:])
>> > > }
>> >
>> > > My objective is to find out if there are any links between the "div"
>> > > tags. The number of links beween the "div" tags are dynamically
>> > > created.   One way would be to find out the size of the URL links and
>> > > if it's greater than 0 loop through it and getLink.  Another way i
>> > > thought is to get the inner html source for the "div" tag and then
>> > > parse it from there.  First, i don't know how to get the UrlLink
>> > > size.  Second, I tried to use getHtmlSource and it's giving me an
>> > > error.  Maybe I'm defining the UI wrong?
>> >
>> > > --
>> > > You received this message because you are subscribed to the Google
>> Groups
>> > > "tellurium-users" group.
>> > > To post to this group, send email to [email protected]
>> .
>> > > To unsubscribe from this group, send email to
>> > > [email protected]<tellurium-users%[email protected]>
>> <tellurium-users%[email protected]<tellurium-users%[email protected]>
>> >
>> > > .
>> > > For more options, visit this group at
>> > >http://groups.google.com/group/tellurium-users?hl=en.
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups "tellurium-users" group.
>> > To post to this group, send email to [email protected].
>> > To unsubscribe from this group, send email to
>> [email protected]<tellurium-users%[email protected]>
>> .
>> > For more options, visit this group athttp://
>> groups.google.com/group/tellurium-users?hl=en.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "tellurium-users" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<tellurium-users%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/tellurium-users?hl=en.
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"tellurium-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tellurium-users?hl=en.

Reply via email to