[wtr-general] Re: To fetch the style.DISPLAY property of an object

2009-10-08 Thread Betsy

In continuation to the previous mail

vals is the array that I receive as properties. For eg:- if property
is class vals[0] = class and if property is style.Display, vals
[0]=style and vals[1]=DISPLAY etc.


On Oct 8, 3:07 pm, Isabel joybe...@gmail.com wrote:
 Hi all,

 I could successfully fetch the style.DISPLAY property of an object in
 Watir using:-
 .attribute_value(vals[0])

 But when I use the same piece of code with Firefox, it returns me an
 error:-
 undefined method `vals' for :String

 where am I going wrong???

 Thanks in advance..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: To fetch the style.DISPLAY property of an object

2009-10-08 Thread Pallavi Sharma
Betsy



The error is with Attribute_value function.



Betsy for Watir, when we do attribute_value(‘STYLE’) it returns an object
for which you can use a . and the other attributes likes color, width and
the value will come out



Where as for FireFox, when you do attribute_value(‘STYLE’) it  returns
a  string,
not an object and you cannot use a “.”  There, so we need to parse that
string and fetch out the value of the attribute we are looking for.



Let me know if this helps

Thanks
Pallavi.

On Thu, Oct 8, 2009 at 6:02 PM, Betsy joybe...@gmail.com wrote:


 In continuation to the previous mail

 vals is the array that I receive as properties. For eg:- if property
 is class vals[0] = class and if property is style.Display, vals
 [0]=style and vals[1]=DISPLAY etc.


 On Oct 8, 3:07 pm, Isabel joybe...@gmail.com wrote:
  Hi all,
 
  I could successfully fetch the style.DISPLAY property of an object in
  Watir using:-
  .attribute_value(vals[0])
 
  But when I use the same piece of code with Firefox, it returns me an
  error:-
  undefined method `vals' for :String
 
  where am I going wrong???
 
  Thanks in advance..
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---