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).
Make sure you are passing in a document node and not a jQuery object.
if ( elem instanceof jQuery ) elem = elem.get(0);
If you were passing in a jQuery object, the 'parent = parent.parentNode'
line would immediately set parent to null.
Also, shouldn't your getColor function return the color if
Sorry for the confusion. Actually, the getColor is a function called
by another function,
which first checks all different css, if the css is color related and
the value is transparent, then
passes in the dom element, not jquery object, to the getColor function
to get back the
actual color. I did
But it LOOKS right on screen?
On Wed, Jan 13, 2010 at 10:22 AM, John john.jian.f...@gmail.com wrote:
Sorry for the confusion. Actually, the getColor is a function called
by another function,
which first checks all different css, if the css is color related and
the value is transparent, then
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,
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
Sorry, I have to come back for this question. I have really wired
problem.
I implemented the getColor similar to the jQuery color plugin as
follows,
function getColor(elem, cssName){
var color = null;
if (elem != null) {
var parent = elem.parentNode;
while (parent != null) {
Thanks for your reply. The output of
.css (background);
is empty.
Also changed the css attribute as 'background-color', it still returns
'transparent'.
Thanks,
John
On Jan 11, 11:03 am, Charlie charlie...@gmail.com wrote:
appears you are using 2 different css attributes. 'background' and
Thanks for your reply. I will try to see if the background color on
the parent works or not.
As for checking the red color, I need to do a UI test and check if
the background color
is set correctly. That is to say, I am testing other people's code and
web page.
Thanks,
John
On Jan 11, 12:41
Yes, indeed, the color on the 'li' tag is red.
Thanks,
John
On Jan 11, 12:54 pm, John john.jian.f...@gmail.com wrote:
Thanks for your reply. I will try to see if the background color on
the parent works or not.
As for checking the red color, I need to do a UI test and check if
the
As a QA tester with a lot of test automation experience, a bit of advice:
Ask if the product would not ship if it wasn't red. If the answer is no,
then you might not want to waste your time. Unless you have automated
everything else about the functionality of the application, and are looking
for
Thanks. I am not a QA tester, but the product maker instead. :-)
I work on the open source project Tellurium automated testing
framework to do functional testing and we
use a lot of jQuery.
Thanks,
John
On Jan 11, 2:31 pm, John Arrowwood jarro...@gmail.com wrote:
As a QA tester with a lot of
12 matches
Mail list logo