After look closely, seems the problem was caused by the fact that Selenium and Tellurium trimmed off the @attr section and treated it as an attribute locator. As a result, the trimmed jQuery selector was not a valid selector and caused the trouble. There are a lot of places in both Selenium and Tellurium I have to touch as well as some extra jQuery syntax check logic to make it work. Furthermore, Tellurium may change the way to represent the attribute locator anyway, thus, we may not be able to handle @ in 0.7.0.
Would it be possible for you to use partial match? for example, have you tried to use "$PhoneNumber" as the name attribute? Thanks, Jian On Apr 6, 5:33 pm, Jian Fang <[email protected]> wrote: > I created a test case SpecialTestCase in trunk/core for you. Seems the test > passed if I used Tellurium Engine, but > failed without the Engine caching. > > The @ character problem may not be really related to jQuery because @ is not > a reserved key in jQuery and it may > be related to the Selenium attribute expression. Selenium uses @attr as the > attribute locator. I need to look into it. > > Thanks, > > Jian > > On Tue, Apr 6, 2010 at 4:30 PM, Jian Fang <[email protected]> wrote: > > Seems there is a jQuery plugin to escape special characters. > > >http://plugins.jquery.com/files/jquery.escape.js.txt > > > On Tue, Apr 6, 2010 at 10:30 AM, Jian Fang <[email protected]>wrote: > > >> You are right, we should escape the @ in the css selector. Will do that. > > >> Thanks, > > >> Jian > > >> On Tue, Apr 6, 2010 at 6:19 AM, Jonathan Share <[email protected]>wrote: > > >>> Hi, > > >>> In my html I have input fields defined as follows (note the @ in the > >>> name); > > >>> <input type="text" class="medium paxFerryNameInput" value="" > >>> name="Profile/Customer/Telephone/@PhoneNumber" maxlength="16" > >>> id="phone1" tabindex="26"> > > >>> that I have modelled as follows; > > >>> Container(uid: "phone") { > >>> Container(uid: "mobile") { > >>> Selector(uid: "country", clocator: [name: > >>> "Profile/Customer/Telephone/@CountryAccessCode"]) > >>> InputBox(uid: "number", clocator: [name: > >>> "Profile/Customer/Telephone/@PhoneNumber"]) > >>> } > >>> } > > >>> Using the CSS selectors (as is now the default) firefox freezes, > >>> providing the slow script warning dialog stating that the jQuery.js > >>> script is spending too much time on line 2663. I assume that the @ in > >>> my clocator needs to be escaped before you send it further to jQuery. > >>> This isn't a huge problem for me as I have just added a call to > >>> disableCSSSelector(), this allows my test to pass for now but it would > >>> be nice to be able to upgrade some time in the future. > > >>> Regards, > > >>> Jonathan > > >>> -- > >>> 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.
