Hi folks,
I'm using cucumber with watir frame-work for my testing. In my step
file, I'm trying to move one of my div from one location to another
location on a browser.

Here is my code:

When /^I move the card to the top area$/ do
    #puts active_empcard.style.TOP
    browser.div(:class => 'eeCard ui-draggable', :id => '0').style.TOP
= "75px"
end

I find a very strange behavior in this code. The div will not move to
the new location unless I added "puts" statement (that I commented out
in the above) prior to the setting. However, I am able to move the div
by setting the value only (w/o adding "puts" statement prior to the
setting) in the console.  This is what I did:

c:\MSS_Test\MSS>console
Type 'irb START' at the prompt.
>> irb START
>> login_page.goto
=> 0.838
>> browser.div(:class => 'eeCard ui-draggable', :id => '0').style.TOP = "100px"
=> "100px"

Can someone help me explain this?

I would like to do this without showing the old location of the div
(by having "puts" statement prior to the setting).

Thanks,
Winata





I would like to have no output on the screen for the old values of the
TOP location. Can someone explain why and help me.

--~--~---------~--~----~------------~-------~--~----~
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