Ok, Paul, let me see if I have this right because what I'm trying to
do is not working.  I need to add the style method you displayed above
to the Element class in the MozillaBaseElement.rb file.  then I call
"puts $Browser.text_field(:id,/PART/).style("left")" and that should
return the left of that text_field.
This is not working for me at all.  I get an error message of
"SyntaxError: syntax error".  I added the method right after the
initialize method.  I know you said that I may have to make
modifications but i'm not even getting close right now

On Jun 9, 5:10 pm, Paul Rogers <paul.rog...@shaw.ca> wrote:
> this is what Ive used. Its hacked out of a bigger method, so may need some
> work
>
>   cmd ="document.defaultView.getComputedStyle( #{element_object} , null)[
> '#{css_rule}' ];\n"
>                jssh_socket.send( cmd , 0 )
>                actual_val = read_socket()
>                return  actual_val
>
> I guess some thing like
>
> class Element
>   def style( css_rule )
>
>          cmd ="document.defaultView.getComputedStyle( #{element_object} ,
> null)[ '#{css_rule}' ];\n"
>                jssh_socket.send( cmd , 0 )
>                actual_val = read_socket()
>                return  actual_val
>
>   end
> end
>
> is what youd use
> and then
>
>  puts button(:id, x).style('display')
>
> but, like I said, hacked from something else so may need some work
>
> Paul
>
>
>
> On Tue, Jun 9, 2009 at 2:52 PM, George <george.sand...@gmail.com> wrote:
>
> > Hey Loft,
>
> > I tried to look into this a little more.  Check this out:
>
> >http://code.google.com/p/firewatir/issues/detail?id=76#c0
>
> > It looks like there is a known issue using 'style' in FF, although I'm
> > not sure if/when it will be resolved.
>
> > HTH,
>
> > George
>
> > On Jun 9, 9:39 am, Loft_Tester <aaronr...@gmail.com> wrote:
> > > I was trying to ask the same question in a differant way.  I figure
> > > with all the people that are using watir that someone may have a way
> > > to pull the style data from a field in firefox.  Like some one has a
> > > way to scrape all the data in a field and then all I have to do is
> > > parse through it to get what I want.
>
> > > On Jun 8, 4:59 pm, Chuck van der Linden <sqa...@gmail.com> wrote:
>
> > > > You had just asked in the other thread if there were workarounds..
> > > > so why are you an hour later starting a new thread asking the very
> > > > same thing?
>
> > > > On Jun 8, 11:55 am, Loft_Tester <aaronr...@gmail.com> wrote:
>
> > > > > I have a question already posted about using "currentstyle" in
> > Firefox
> > > > > and the fact that it dosen't work correctly.  Is there another way to
> > > > > gather style attributes such as left,top, color and so on.  If
> > > > > possible,  I would like to do this with out modifying the firewatir
> > > > > files.  if there is a solution that works in both IE and Firefox that
> > > > > would be best.  Thanks.
>
> > > > > ps for more information on what I'm trying to do please see my other
> > > > > post athttp://
> > groups.google.com/group/watir-general/browse_thread/thread/a1a...
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to