Fixed, please update Core 0.6.0 from Maven repo.

On Fri, May 15, 2009 at 8:45 AM, Jian Fang <[email protected]> wrote:

> I see, that should be a bug, I will fix it soon.
>
>
> On Fri, May 15, 2009 at 5:18 AM, Rohan Holt <[email protected]> wrote:
>
>> Thanks Jian, That works now. There are still some issues with getListSize
>> though.
>> In order to use the XPath version of getListSize you cannot just call
>> getListSizeByXPath(), you have to disableJQuerySelector before the
>> getListSize call then re enable JQuery.
>>
>> Just calling getListSizeByXPath() results in invalid xpath statements.
>>
>> 10:04:32.817 INFO - Command request: getXpathCount[jquery=#main
>> div.myBox/div, ] on session 21c2e4d3b60942d497eb080078c8998a
>> 10:04:32.858 INFO - Got result: ERROR: Invalid xpath: jquery=#main
>> div.myBox/div on session 21c2e4d3b60942d497eb080078c8998a
>>
>> R
>>
>> On 14 May 2009, at 19:58, Jian Fang wrote:
>>
>> I updated the trunk/core code to work around this problem and redeployed
>> core 0.6.0 to Maven repo. Please see the
>> InternalProfileTestCase.
>>
>> Later, we may need to re-visit this issue since the group locating may be
>> affected without the position information if we
>> have multiple elements with the same tag.
>>
>> Thanks,
>>
>> Jian
>>
>> On Thu, May 14, 2009 at 2:51 PM, Rohan Holt <[email protected]> wrote:
>>
>>> That sounds like the easiest solution. Thanks for the update.
>>> R
>>>
>>> On 14 May 2009, at 19:39, Jian Fang wrote:
>>>
>>> I created a test case using your html and UI module and can re-produce
>>> your error.
>>> Seems jQuery does have limitation/issue on the has() selector. One way to
>>> work around this
>>> is to let Tellurium core filter out the position attribute when build the
>>> has() selector.
>>>
>>> On Thu, May 14, 2009 at 12:23 PM, Jian Fang <[email protected]>wrote:
>>>
>>>> Rohan,
>>>>
>>>> Thanks for reporting this. Just saw the post because of the Google
>>>> outage.
>>>>
>>>> I will look into it.
>>>>
>>>> Mikhail, could you please add the html in the post to Tellurium test
>>>> page so that I
>>>> can create a test case for it?
>>>>
>>>> Thanks,
>>>>
>>>> Jian
>>>>
>>>>
>>>> On Thu, May 14, 2009 at 11:06 AM, rohanh <[email protected]> wrote:
>>>>
>>>>>
>>>>> Not sure if this is a Tellurium issue or a JQuery issue but given the
>>>>> following model
>>>>>
>>>>>       Form(uid: "UserEditPrivateProfileForm", clocator: [tag: "form",
>>>>> name: "theForm", method: "post"], group: "true"){
>>>>>                /*
>>>>>               InputBox(uid: "Address1"   ,clocator: [tag: "input" ,
>>>>> type: "text"  ,name: "address1"])
>>>>>                InputBox(uid: "Address2"   ,clocator: [tag: "input" ,
>>>>> type:
>>>>> "text"  ,name: "address2"])
>>>>>                InputBox(uid: "Address3"   ,clocator: [tag: "input" ,
>>>>> type:
>>>>> "text"  ,name: "city"])
>>>>>                InputBox(uid: "PostCode"   ,clocator: [tag: "input" ,
>>>>> type:
>>>>> "text"  ,name: "postcode"])
>>>>>                InputBox(uid: "Telephone"  ,clocator: [tag: "input" ,
>>>>> type:
>>>>> "text"  ,name: "tel"])
>>>>>                InputBox(uid: "Email"      ,clocator: [tag: "input" ,
>>>>> type:
>>>>> "text"  ,name: "email"])
>>>>>                Selector(uid: "Gender"     ,clocator: [tag: "select",
>>>>> name: "gender"])
>>>>>                InputBox(uid: "Mobile"     ,clocator: [tag: "input" ,
>>>>> type:
>>>>> "text"  ,name: "Mobile"])
>>>>>               */
>>>>>               List(uid: "Fields" , clocator: [tag: "div", class:
>>>>> "test", position: "2"], separator: "div") {
>>>>>                    Container(uid: "all") {
>>>>>                      InputBox(uid: "item"    , clocator: [:])
>>>>>                      Selector(uid: "selector", clocator: [:])
>>>>>                    }
>>>>>               }
>>>>>                SubmitButton(uid: "Submit" ,clocator: [tag: "input" ,
>>>>> type:
>>>>> "submit",name: "submit"], respond: ["click", "mouseOut", "mouseOver"])
>>>>>        }
>>>>>
>>>>>
>>>>> a call to getListSize("UserEditPrivateProfileForm.Fields") generates
>>>>> the following JQuery selector:
>>>>>
>>>>> 5:11:00.631 INFO - Command request: getListSize[jquery=#main form
>>>>> [name=theForm][method=post]:has(div.test:eq(1), input[type=submit]
>>>>> [name=submit]) div.test:eq(1), div] on session
>>>>> 65c1e3d5c462489cb6402b2d663a99ef
>>>>> 15:11:00.647 INFO - Got result: ERROR: Element jquery=#main form
>>>>> [name=theForm][method=post]:has(div.test:eq(1), input[type=submit]
>>>>> [name=submit]) div.test:eq(1) not found on session
>>>>> 65c1e3d5c462489cb6402b2d663a99ef
>>>>>
>>>>> The problem with this seems to be the :eq(1) within the has(). If I
>>>>> change the selector from
>>>>>
>>>>> #main form[name=theForm][method=post]:has(div.test:eq(1), input
>>>>> [type=submit][name=submit]) div.test:eq(1)
>>>>>
>>>>> to
>>>>>
>>>>> #main form[name=theForm][method=post]:has(div.test, input[type=submit]
>>>>> [name=submit]) div.test:eq(1)
>>>>>
>>>>> The correct List div is returned....
>>>>>
>>>>> Maybe this is a restriction with JQuery but I am not sure. I would
>>>>> have expected a has() to take any valid selector...
>>>>>
>>>>> Here is the html to test with if you wish:
>>>>>
>>>>> <form method="post"  name="theForm">
>>>>>       <div class="domtab3">
>>>>>           <ul class="domtabs3">
>>>>>               <li><a href="#t1" title="Internal
>>>>> Profile"><span>Internal Profile</span></a></li>
>>>>>               <li><a href="#t2" title="Private Profile"><span>Private
>>>>> Profile</span></a></li>
>>>>>               <li><a href="#t3" title="Public Profile"><span>Public
>>>>> Profile</span></a></li>
>>>>>               <li><a href="#t4" title="Work History"><span>Work
>>>>> History</span></a></li>
>>>>>           </ul>
>>>>>           <INPUT TYPE="hidden" NAME="tabsub" ID="tabsub"
>>>>> VALUE="internal">
>>>>>           <div class="test">
>>>>>               <span><a name="t1" id="t1"></a></span>
>>>>>           </div>
>>>>>           <div class="test">
>>>>>               <span><a name="t2" id="t2"></a></span>
>>>>>               <div>
>>>>>                   <div>Address</div>
>>>>>                   <div><input type="text" name="address1"
>>>>> value="address line 1" size="40" ></div>
>>>>>               </div>
>>>>>               <div>
>>>>>                   <div></div>
>>>>>                   <div><input type="text" name="address2"
>>>>> value="address line 2" size="40" ></div>
>>>>>               </div>
>>>>>               <div>
>>>>>                   <div></div>
>>>>>                   <div><input type="text" name="city" value="address
>>>>> line 3" size="30" ></div>
>>>>>               </div>
>>>>>               <div>
>>>>>                   <div>Postcode</div>
>>>>>                   <div><input type="text" name="postcode"
>>>>> value="postcode" size="30" ></div>
>>>>>               </div>
>>>>>               <div>
>>>>>                   <div>Tel*</div>
>>>>>                   <div><input type="text" value="" size="30"
>>>>> name="tel"></div>
>>>>>               </div>
>>>>>               <div>
>>>>>                   <div>Email*</div>
>>>>>                   <div><input type="text"
>>>>> value="[email protected]" size="30" name="email"></div>
>>>>>               </div>
>>>>>               <INPUT TYPE="submit" NAME="submit" VALUE="Save"
>>>>> class='submit' onClick="d=document.getElementById
>>>>> ('tabsub');d.value='private';return true;">
>>>>>           </div>
>>>>>           <div class="test">
>>>>>               <span><a name="t3" id="t3"></a></span>
>>>>>               <div>
>>>>>                   <div>Name</div>
>>>>>                   <div><input type="text" size="30"
>>>>> name="newusername" value="admin"></div>
>>>>>               </div>
>>>>>               <div>
>>>>>                   <div><strong>Birth Date</strong></div>
>>>>>                   <div><input name="Birth Date" type="text" size="30"
>>>>> value=""></div>
>>>>>               </div>
>>>>>               <div>
>>>>>                   <div><strong>Job Title</strong></div>
>>>>>                   <div><input name="Job Title" type="text" size="30"
>>>>> value=""></div>
>>>>>               </div>
>>>>>               <div>
>>>>>                   <div><strong>Company</strong></div>
>>>>>                   <div><input name="Company" type="text" size="30"
>>>>> value=""></div>
>>>>>               </div>
>>>>>
>>>>>               <INPUT TYPE="submit" NAME="submit" VALUE="Save"
>>>>> class='submit' onClick="d=document.getElementById
>>>>> ('tabsub');d.value='public';">
>>>>>           </div>
>>>>>           <div class="test">
>>>>>               <span><a name="t4" id="t4"></a></span>
>>>>>               <a href="/members/admin/index_edit.html?
>>>>> add_new_job=1">Add new job...</a><br><br>
>>>>>               <INPUT TYPE="submit" NAME="submit" VALUE="Save"
>>>>> class='submit' onClick="d=document.getElementById
>>>>> ('tabsub');d.value='jobs';;return 1;">
>>>>>           </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]
For more options, visit this group at 
http://groups.google.com/group/tellurium-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to