Now I'd like to click an image in a page by it's id, but sometimes it
returns empty value to me when the image is actually existing (error
raised in "MozillaBaseElement.rb:1117:in `click'").

My script is something like: someframe.image(:id, someimg).click()

But when I go through the scripts in debug mode, the image can be
found. So I suspected whether it's caused by socket and tried to add
sleep in the location as following, the data can be received correctly
after that.

==container.rb====
def read_socket(socket = jssh_socket)
     .....
      while(s == nil) do
        s = Kernel.select([socket] , nil , nil, 1)
      end

#      sleep 0.2  # added sleep

      for stream in [socket]
        data = stream.recv(1024)  #here data is empty when sleep not
added
..........

Have any ideas about it?

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

Reply via email to