[wtr-general] Re: Handling popups using watir

2009-04-09 Thread George

What about this neat little script?

ie = Watir::IE.attach(/Watir General/)
ie.text_field(:name, q).set popups
ie.button(:name, qt_g).click


Seriously, though...part of the learning process is doing the
research.  You can't expect that an entirely new set of Watir users
are going to magically appear just because you started a duplicate
thread in the same day.  I've been finding that the trial and error
approach to solving my scripting problems helps me develop more.  You
really shouldn't take advantage of people who are really trying to
help you.



On Apr 8, 10:55 pm, spike vinaykumarl...@gmail.com wrote:
 ya but the solutions are not working for me.

 On Apr 9, 10:35 am, George george.sand...@gmail.com wrote:

  Didn't you just make a thread about this?

  On Apr 8, 9:23 pm, spike vinaykumarl...@gmail.com wrote:

   Hi

   Can somebody please help me with handling popups using Watir i'm stuck
   with this. I tried many suggestions but it didnt help me.

   I'm working on Windows XP and Internet Explorer 7.
   somebody suggested me to install autoIt for handling popups so i've
   installed autoIT-v3 also.

   please please.. help me to handle popups like file download and
   javascript

   thankingyou- Hide quoted text -

  - Show quoted text -
--~--~-~--~~~---~--~~
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: Handling popups using watir

2009-04-09 Thread spike

I'm really sorry, i've tried many things in the code but couldn get a
solution from past 3 days. I've stuck in handling this popups. so
please dont mind, i apologise for it.

On Apr 9, 11:14 am, George george.sand...@gmail.com wrote:
 What about this neat little script?

 ie = Watir::IE.attach(/Watir General/)
 ie.text_field(:name, q).set popups
 ie.button(:name, qt_g).click

 Seriously, though...part of the learning process is doing the
 research.  You can't expect that an entirely new set of Watir users
 are going to magically appear just because you started a duplicate
 thread in the same day.  I've been finding that the trial and error
 approach to solving my scripting problems helps me develop more.  You
 really shouldn't take advantage of people who are really trying to
 help you.

 On Apr 8, 10:55 pm, spike vinaykumarl...@gmail.com wrote:



  ya but the solutions are not working for me.

  On Apr 9, 10:35 am, George george.sand...@gmail.com wrote:

   Didn't you just make a thread about this?

   On Apr 8, 9:23 pm, spike vinaykumarl...@gmail.com wrote:

Hi

Can somebody please help me with handling popups using Watir i'm stuck
with this. I tried many suggestions but it didnt help me.

I'm working on Windows XP and Internet Explorer 7.
somebody suggested me to install autoIt for handling popups so i've
installed autoIT-v3 also.

please please.. help me to handle popups like file download and
javascript

thankingyou- Hide quoted text -

   - Show quoted text -- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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: Handling popups using watir

2009-04-09 Thread kiran yajamanyam
opps forgot to attach file :(

On Thu, Apr 9, 2009 at 12:18 PM, spike vinaykumarl...@gmail.com wrote:


 I'm really sorry, i've tried many things in the code but couldn get a
 solution from past 3 days. I've stuck in handling this popups. so
 please dont mind, i apologise for it.

 On Apr 9, 11:14 am, George george.sand...@gmail.com wrote:
  What about this neat little script?
 
  ie = Watir::IE.attach(/Watir General/)
  ie.text_field(:name, q).set popups
  ie.button(:name, qt_g).click
 
  Seriously, though...part of the learning process is doing the
  research.  You can't expect that an entirely new set of Watir users
  are going to magically appear just because you started a duplicate
  thread in the same day.  I've been finding that the trial and error
  approach to solving my scripting problems helps me develop more.  You
  really shouldn't take advantage of people who are really trying to
  help you.
 
  On Apr 8, 10:55 pm, spike vinaykumarl...@gmail.com wrote:
 
 
 
   ya but the solutions are not working for me.
 
   On Apr 9, 10:35 am, George george.sand...@gmail.com wrote:
 
Didn't you just make a thread about this?
 
On Apr 8, 9:23 pm, spike vinaykumarl...@gmail.com wrote:
 
 Hi
 
 Can somebody please help me with handling popups using Watir i'm
 stuck
 with this. I tried many suggestions but it didnt help me.
 
 I'm working on Windows XP and Internet Explorer 7.
 somebody suggested me to install autoIt for handling popups so i've
 installed autoIT-v3 also.
 
 please please.. help me to handle popups like file download and
 javascript
 
 thankingyou- Hide quoted text -
 
- Show quoted text -- Hide quoted text -
 
  - Show quoted text -
 


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

class Watir::Element 


  # If any parent element isn't visible then we cannot write to the 
  # element. The only realiable way to determine this is to iterate 
  # up the DOM element tree checking every element to make sure it's 
  # visible. 
  def visible? 
# Now iterate up the DOM element tree and return false if any 
# parent element isn't visible or is disabled. 
object = document 
while object 
  begin 
if object.currentstyle.invoke('visibility') =~ /^hidden$/i 
  return false 
end 
if object.currentstyle.invoke('display') =~ /^none$/i 
  return false 
end 
if object.invoke('isDisabled') 
  return false 
end 
  rescue WIN32OLERuntimeError 
  end 
  object = object.parentElement 
end 
true 
  end 


  def top_edge
assert_exists
assert_enabled
ole_object.getBoundingClientRect.top.to_i
  end
  
  def top_edge_absolute
top_edge + page_container.document.parentWindow.screenTop.to_i
  end
  
  def left_edge
assert_exists
assert_enabled
ole_object.getBoundingClientRect.left.to_i
  end
  
  def left_edge_absolute
left_edge + page_container.document.parentWindow.screenLeft.to_i
  end
  
  def mouse_hover(offsetX = 0, offsetY = 0)
x = left_edge_absolute + offsetX
y = top_edge_absolute + offsetY
WindowsInput.move_mouse(x, y)
  end
  
  def mouse_click(offsetX = 0, offsetY = 0)
x = left_edge_absolute
y = top_edge_absolute
WindowsInput.move_mouse(x, y) 
Watir.autoit.MouseClick(left, x+offsetX, y+offsetY, 1)
sleep(2)  
  end
  
  def right_click(offsetX = 0, offsetY = 0)
x = left_edge_absolute
y = top_edge_absolute  
WindowsInput.move_mouse(x+offsetX, y+offsetY)
WindowsInput.right_click
  end
  

 
end 

[wtr-general] Re: Handling popups using watir

2009-04-09 Thread Chuck van der Linden

In the future please stick with the thread you started for the issue,
it's best for everyone to have one thread per issue, which hopefully
ends with a solution to the problem.  Abandoning one thread and
starting another just because you didn't like the answers makes things
more confused for everyone. as my 8 year old would have said a few
years ago it causes confusion and delay, which is a bad thing.

1) new folks searching for a solution now find more threads, some of
which end up as dead-ends because someone like you abandoned the
thread and started a new one.  that makes it harder for them to find
an answer.
2) there's now no history of 'what' the 'several things' are that you
have tried, so anyone joining in trying to help is entirely likely to
suggest solutions that may have already been tried, that just
frustrates you, and worse it wastes their time (and remember everyone
here is a volunteer, NOBODY is being paid to help you, we all mostly
have real jobs and our time is valuable to us)
3) It strikes most of us as something similar to what a child does
when they don't like the answer that mom gave, and so go ask dad in
hopes of getting a different answer.   As a result (see next item)
4) You risk having the very person who might have helped you mentally
'flip the twit-bit' on your useid, and decide you are not worth their
time, and just respond to other messages instead.  Which isn't so bad
for other folks needing help, but kinda sucks for you.

--Chuck


On Apr 8, 10:55 pm, spike vinaykumarl...@gmail.com wrote:
 ya but the solutions are not working for me.

 On Apr 9, 10:35 am, George george.sand...@gmail.com wrote:



  Didn't you just make a thread about this?

  On Apr 8, 9:23 pm, spike vinaykumarl...@gmail.com wrote:

   Hi

   Can somebody please help me with handling popups using Watir i'm stuck
   with this. I tried many suggestions but it didnt help me.

   I'm working on Windows XP and Internet Explorer 7.
   somebody suggested me to install autoIt for handling popups so i've
   installed autoIT-v3 also.

   please please.. help me to handle popups like file download and
   javascript

   thankingyou- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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: Handling popups using watir

2009-04-09 Thread Chuck van der Linden

On Apr 8, 10:35 pm, George george.sand...@gmail.com wrote:
 Didn't you just make a thread about this?

Actually I count 4.   maybe more I might have missed a few.


--~--~-~--~~~---~--~~
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: Handling popups using watir

2009-04-08 Thread George

Didn't you just make a thread about this?

On Apr 8, 9:23 pm, spike vinaykumarl...@gmail.com wrote:
 Hi

 Can somebody please help me with handling popups using Watir i'm stuck
 with this. I tried many suggestions but it didnt help me.

 I'm working on Windows XP and Internet Explorer 7.
 somebody suggested me to install autoIt for handling popups so i've
 installed autoIT-v3 also.

 please please.. help me to handle popups like file download and
 javascript

 thankingyou
--~--~-~--~~~---~--~~
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: Handling popups using watir

2009-04-08 Thread spike

ya but the solutions are not working for me.

On Apr 9, 10:35 am, George george.sand...@gmail.com wrote:
 Didn't you just make a thread about this?

 On Apr 8, 9:23 pm, spike vinaykumarl...@gmail.com wrote:



  Hi

  Can somebody please help me with handling popups using Watir i'm stuck
  with this. I tried many suggestions but it didnt help me.

  I'm working on Windows XP and Internet Explorer 7.
  somebody suggested me to install autoIt for handling popups so i've
  installed autoIT-v3 also.

  please please.. help me to handle popups like file download and
  javascript

  thankingyou- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---