Hi,
Your UI module definition might be problematic. I used the following one and
can get back the list size 2 correctly
ui.Form(uid: "Sailings", clocator: [name: "selectedSailingsForm"]){
List(uid: "Fares", clocator: [tag: "ul", class: "fares"], separator:
"li"){
Container(uid: "all"){
RadioButton(uid: "radio", clocator: [:], respond: ["click"])
TextBox(uid: "label", clocator: [tag: "label"])
}
}
}
You should use the logical container to include the list elements.
Also, please don't use hard coded xpath there, otherwise, your test is not
robust to changes. Also, most 0.7.0 new
features require the clocator.
Interesting thing is I can get back the correct List size even with your UI
module with new Tellurium API. I will
post all my test code soon.
Thanks,
Jian
On Mon, Feb 1, 2010 at 10:49 AM, Jian Fang <[email protected]> wrote:
> You are right, the new core added a WorkflowContext variable to all
> Accessor methods
> so that we can pass in meta data to the tiers under it. That is why it
> cannot find the method with
> the old snapshot.
>
> Thanks,
>
> Jian
>
>
> On Mon, Feb 1, 2010 at 10:35 AM, Jonathan Share <[email protected]>wrote:
>
>> Thanks, I'm also having problems with getXpathCount, but that may be
>> because I'm using an old snapshot in order to work around the list
>> problem.
>>
>> "groovy.lang.MissingMethodException: No signature of method:
>> org.telluriumsource.access.Accessor.getXpathCount() is applicable for
>> argument types: (java.lang.String) values:
>>
>> [//descendant-or-self::tab...@id="supplierEditor"]/tbody/tr[child::td]/td[1]]"
>>
>> 2010/2/1 Jian Fang <[email protected]>:
>> > Thanks for reporting the problem. I will create a test case and see what
>> > happens.
>> >
>> > Thanks,
>> >
>> > Jian
>> >
>> > On Mon, Feb 1, 2010 at 7:20 AM, Jonathan Share <[email protected]>
>> wrote:
>> >>
>> >> Hi,
>> >>
>> >> I seem to be having a little problem with getListSize. When I call
>> >> that method tellurium crashes on me with the following exception;
>> >>
>> >> com.thoughtworks.selenium.SeleniumException: ERROR: Element
>> >>
>> >>
>> //descendant-or-self::fo...@name="selectedSailingsForm"]/div[1]/d...@class="option"][1]/descendant-or-self::ul/li[3]
>> >> not found
>> >>
>> >> The interesting thing to note here is that there are only two li
>> >> elements in the list. Is this a bug that has crept into tellurium or
>> >> am I doing something really stupid in my test?
>> >>
>> >> Thanks in advance
>> >>
>> >> Jonathan
>> >>
>> >> // MODEL
>> >> ui.Form(uid: "selectedSailings", clocator: [name:
>> "selectedSailingsForm"])
>> >> {
>> >> List(uid: "outgoingSailings", locator: "/div[1]") {
>> >> Container(uid: "all", clocator: [tag: "div", 'class':
>> >> "option"]) {
>> >> List(uid: "fares", clocator: [tag: "ul"]) {
>> >> Container(uid: "all", clocator: [tag: "li"]) {
>> >> RadioButton(uid: "radio", clocator: [:],
>> >> respond: ["click"])
>> >> TextBox(uid: "label", clocator: [tag:
>> "label"])
>> >> }
>> >> }
>> >> TextBox(uid: "departureTime", locator:
>> >> "/div/dl/dd/em[1]")
>> >> }
>> >> }
>> >> }
>> >>
>> >> // TEST LINE THAT FAILS
>> >> def numPricesForSailing =
>> >> getListSize("selectedSailings.outgoingSailings[1].fares")
>> >>
>> >> // HTML (edited a little)
>> >> <form action="..." id="airDetailsForm" method="POST"
>> >> name="selectedSailingsForm">
>> >> <div class="segment clearfix">
>> >> <div class="option">
>> >> <ul class="fares">
>> >> <li>
>> >> <input id="..." name="..." type="radio" value="..." checked
>> >> onclick="enableDisable(1,2)"> <label for="..."><strong><span
>> >> id="...">3,000</span>KR</strong>economy</label>
>> >> </li>
>> >> <li>
>> >> <input id="..." name="..." type="radio" value="..."
>> >> onclick="enableDisable(1,1)"> <label for="..."><strong><span
>> >> id="...">4,000</span>KR</strong> Flexible</label>
>> >> </li>
>> >> </ul>
>> >> </div>
>> >> </div>
>> >> </form>
>> >>
>> >> --
>> >> 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]<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 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.