It turned out to be a bug in jQuery 1.3.2. I upgraded to jQuery 1.4 and the problem is solved. I can get back the correct background color rgb(255, 0, 0) now.
Really appreciate John Arrowwood's help on this. A bit about the Tellurium automated testing framework (http:// code.google.com/p/aost). It grew out of the Selenium Testing framework with total different concepts. In Tellurium, we focus on UI module, i.e., a collection of UI elements instead of individual ones. We use UI element's attributes to define the UI module, take the google search web page as an example, the search module can be defined as follows, ui.Container(uid: "GoogleSearchModule", clocator: [tag: "td"], group: "true"){ InputBox(uid: "Input", clocator: [title: "Google Search"]) SubmitButton(uid: "Search", clocator: [name: "btnG", value: "Google Search"]) SubmitButton(uid: "ImFeelingLucky", clocator: [value: "I'm Feeling Lucky"]) } Then, tellurium can automatically generate runtime jQuery css selectors to locate the elements on the browser DOM. For the testing script, you can simply use DSLs such as type "GoogleSearchModule.Input", "Tellurium test" click "GoogleSearchModule.Search" Another new and very powerful addon in tellurium 0.7.0 is the group locating algorithm. The algorithm can locate the above whole UI module in the DOM and cache it for later access. Pretty interesting topic. Anyway, thanks a lot for all the people in jQuery group. Best, John On Jan 13, 4:16 pm, John Arrowwood <jarro...@gmail.com> wrote: > That suggests that the selector that you are using to do your test is not > quite right. Throw in a console.log( elem ) in a judicious location and > find out what is being passed in. > > On Wed, Jan 13, 2010 at 12:00 PM, John <john.jian.f...@gmail.com> wrote: > > Yes, it does look right on screen. Also the wired thing is that if I > > use > > Firebug console to manually get the color by > > > $("#category-list > li.division:eq(0) ul > li:eq(0)").css("background- > > color"); > > > it returns the correct one, rgb(255, 0, 0). Not sure why it does not > > work programmatically. > > > Thanks, > > > John