[wtr-general] Re: How to handle popup confirm window in Ubuntu firefox3.0 with Firewatir-1.6.2

2009-04-09 Thread Angrez Singh
Hi,

Thanks for the code. I checked it here with the same configuration i.e. same
text it works. Can you try just clicking the ok button like this:

ff.startClicker(ok)

- Angrez

ff.startClicker(ok,1,'',The configuration on this page will resetall the
 active connections, are you sure to submit?)




 Here I have another problem, it seems that ff.wait can't always work,
 so somethime script will complain no finding of html element and quit.


 Thanks


 On 3月23日, 下午2时31分, Angrez Singh ang...@gmail.com wrote:
  Can you make sure that pop up text is correct? Also can you post your
  ruby/html code here so that we can help you better.
 
  - Angrez
 
  On Mon, Mar 23, 2009 at 7:37 AM, ajee ajee@gmail.com wrote:
 
   Hi all, I have searched the Internet for a long time on this topic,
   but there is no resolve I got. I know that somebody raises advice of
   using startClicker, but when I use it, no use:
 
   ff.startClicker(ok,1,'',The configuration on this page will reset
   all connections, are you sure to submit?)
 
   In order to know why, I managed to compile jssh.xpi, to get into
   firefox 3.0, adding some debug msg. By this, I saw jssh gets the
   correct msg of startClicker from firewatir,  proxied_shell-
   ExecuteBuffer return NS_OK. So I don't  know how to go on, with this
   popup javascript confirm window, Firefox can't proceed.
 


--~--~-~--~~~---~--~~
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: Error in handling popup

2009-04-09 Thread kiran yajamanyam
Now I got the problem you are facing. I think in your code u would have used
click() method just before the code to handle popup. If this is the case ,
script would not be coming out of click() method and go to next step. This
happens in a case when when used click method and if a popup appears after
click.

please let me know if you have this issue. I have a work arround where in u
need to extend your element class.

You can ping me at kiranyajaman...@gmail.com if you have any issues with
this. Try the following code once:

Copy paste this code and use it. Check if its due to timing issue.

require 'win32ole'

autoit = WIN32OLE.new('AutoItX3.Control')

autoit.WinWait('Windows Internet Explorer', '', 2)

autoit.WinActivate('Windows Internet Explorer')
autoit.Send('{space}')

Regards,
Kiran Y

On Thu, Apr 9, 2009 at 11:29 AM, spike vinaykumarl...@gmail.com wrote:


 Sorry sir even it is not working i've to click it manually to go
 further in my test. wat about this autoit i've installed autoit-v3 how
 is it related to watir..?


 On Apr 9, 10:43 am, kiran yajamanyam kiranyajaman...@gmail.com
 wrote:
  make sure that ur caption is same (Including caps) and if
  autoit.Send({'enter'}) is not working try with autoit.Send({'space'})
 
 
 
  On Thu, Apr 9, 2009 at 11:10 AM, spike vinaykumarl...@gmail.com wrote:
 
   if i'm clicking the OK button manually its going further to do rest
   of the operations or els its hung with the popup
 
   On Apr 9, 10:38 am, kiran yajamanyam kiranyajaman...@gmail.com
   wrote:
You have to give the exact caption of the window which is appearing
 as
popup. In your case that caption of the pop up is FILE
UPLOADED SUCCESSFULLY try this code:
 
autoit = WIN32OLE.new('AutoItX3.Control')
Opt(WinTitleMatchMode, 3)
autoit.WinWait('FILE UPLOADED SUCCESSFULLY', '', 2)
 
autoit.WinActivate('FILE UPLOADED SUCCESSFULLY')
autoit.Send('{enter}')
 
if you are online in g-talk you can ping me.
 
Regards,
Kiran Y
kiranyajaman...@gmail.com
 
On Thu, Apr 9, 2009 at 11:02 AM, spike vinaykumarl...@gmail.com
 wrote:
 
 Ya it still didnt work for me
 
 Test Scenario
 
 I'm running on windows platform with IE7
 I've to upload a file to the application i'm testing. to do that
 i'm
 login to the application and navigating to the respective page
 where
 i've to upload the file. I'm able to upload the file, upon
 successfully uploading the fiel a POPUP appears with the msg FILE
 UPLOADED SUCCESSFULLY and it has a button OK which has to
 clicked
 for the popup to disappear. i'm stuck here. the code is not
 clicking
 the OK button. following is the script i'm running.
 
 require 'Watir'
 require 'test/unit'
 
 class Manageresources  Test::Unit::TestCase
 
 def test_manage_resources
 ie = Watir::IE.start http://192.168.25.10:215/;
 ie.maximize()
 ie.text_field(:name, Login1$UserName).set(vinay)
 ie.text_field(:name, Login1$Password).set(welcome)
 ie.checkbox(:name, Login1$RememberMe).click
 ie.button(:value, Log In).click
 ie.link(:href, http://192.168.25.10:215/administrator/
 Default.aspx).click
 ie.link(:href, javascript:__doPostBack
 ('ctl00$Menu1','Resources')).click
 ie.link(:href, http://192.168.25.10:215/admin/
 ManageResources.aspx).click
 ie.link(:id, ctl00_ContentPlaceHolder1_lnkAdd).click
 ie.radio(:id, ctl00_ContentPlaceHolder1_rdCourses_1).click
 ie.button(:id, ctl00_ContentPlaceHolder1_btnNext).click
 ie.file_field(:id, ctl00_ContentPlaceHolder1_Uploadfile).set(D:\
 \BCSBI.zip)
 ie.file_field(:id, ctl00_ContentPlaceHolder1_btnUpload).click
 # For handling popups
  require 'win32ole'
   autoit = WIN32OLE.new('AutoItX3.Control')
  #  Opt(WinTitleMatchMode, 3)
 autoit.WinWait('Windows Internet Explorer', '', 2)
 
 autoit.WinActivate('Windows Internet Explorer')
 autoit.Send('{~}')
 
  if ie.radio(:id,
 ctl00_ContentPlaceHolder1_RdlistisFeedback_1).isSet?
puts IS FEEDBACK option Yes is selected
else
  ie.radio(:id,
 ctl00_ContentPlaceHolder1_RdlistisFeedback_1).click
end
ie.select_list(:id,
 ctl00_ContentPlaceHolder1_DdlAccesstype).set
 (Public)
ie.select_list(:id,
 ctl00_ContentPlaceHolder1_DdlApprovaltype).set(Admin)
 
 end
 end
 
 Please suggest me a solution
 
 thankingyou
 
 On Apr 9, 9:24 am, kiran yajamanyam kiranyajaman...@gmail.com
 wrote:
  missed this piece of code
 
  require 'win32ole'
 
  still if it wont work just comment out  Opt(WinTitleMatchMode,
 3)
   code
 and
  try.
 
  If still it wont work please send me the scenario u are testing i
   will
 try
  and give u the code.
 
  Regards,
  Kiran Y
 
  On Thu, Apr 9, 2009 at 9:26 AM, spike vinaykumarl...@gmail.com
   wrote:
 
   I used this code but i'm getting the following error
 
   1) 

[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: How to handle popup confirm window in Ubuntu firefox3.0 with Firewatir-1.6.2

2009-04-09 Thread ajee

Hey Angrez,

I tried, unfortunately, still failed. I wonder if we are using
different system, as titled, I am in Ubuntu, with FF3, jssh0.9. Is any
suggestion for me? or can you tell the internals between firewatir and
jssh and how to debug, since I can build jssh plugin from source code,
so I can monitor in which step it is failed.

Thanks

On 4月9日, 下午2时08分, Angrez Singh ang...@gmail.com wrote:
 Hi,

 Thanks for the code. I checked it here with the same configuration i.e. same
 text it works. Can you try just clicking the ok button like this:

 ff.startClicker(ok)

 - Angrez

 ff.startClicker(ok,1,'',The configuration on this page will resetall the

  active connections, are you sure to submit?)

  Here I have another problem, it seems that ff.wait can't always work,
  so somethime script will complain no finding of html element and quit.

  Thanks

  On 3月23日, 下午2时31分, Angrez Singh ang...@gmail.com wrote:
   Can you make sure that pop up text is correct? Also can you post your
   ruby/html code here so that we can help you better.

   - Angrez

   On Mon, Mar 23, 2009 at 7:37 AM, ajee ajee@gmail.com wrote:

Hi all, I have searched the Internet for a long time on this topic,
but there is no resolve I got. I know that somebody raises advice of
using startClicker, but when I use it, no use:

ff.startClicker(ok,1,'',The configuration on this page will reset
all connections, are you sure to submit?)

In order to know why, I managed to compile jssh.xpi, to get into
firefox 3.0, adding some debug msg. By this, I saw jssh gets the
correct msg of startClicker from firewatir,  proxied_shell-
ExecuteBuffer return NS_OK. So I don't  know how to go on, with this
popup javascript confirm window, Firefox can't proceed.
--~--~-~--~~~---~--~~
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] Count Open Browsers

2009-04-09 Thread Isabel

Hi,
Could anyone pleae let me know a way to count the number of browsers
that are open on my system at run time??

Thanks.
--~--~-~--~~~---~--~~
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: Count Open Browsers

2009-04-09 Thread Isabel

how do we use process_count() work??

On Apr 9, 12:11 pm, Isabel joybe...@gmail.com wrote:
 Hi,
 Could anyone pleae let me know a way to count the number of browsers
 that are open on my system at run time??

 Thanks.
--~--~-~--~~~---~--~~
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: How to handle popup confirm window in Ubuntu firefox3.0 with Firewatir-1.6.2

2009-04-09 Thread Angrez Singh
I tested it on windows with FF3 not sure about ubuntu. You can use some puts
statements in firewatir class i mean you can go through the startclicker
method and see where it fails?

- Angrez

2009/4/9 ajee ajee@gmail.com


 Hey Angrez,

 I tried, unfortunately, still failed. I wonder if we are using
 different system, as titled, I am in Ubuntu, with FF3, jssh0.9. Is any
 suggestion for me? or can you tell the internals between firewatir and
 jssh and how to debug, since I can build jssh plugin from source code,
 so I can monitor in which step it is failed.

 Thanks

 On 4月9日, 下午2时08分, Angrez Singh ang...@gmail.com wrote:
  Hi,
 
  Thanks for the code. I checked it here with the same configuration i.e.
 same
  text it works. Can you try just clicking the ok button like this:
 
  ff.startClicker(ok)
 
  - Angrez
 
  ff.startClicker(ok,1,'',The configuration on this page will resetall
 the
 
   active connections, are you sure to submit?)
 
   Here I have another problem, it seems that ff.wait can't always work,
   so somethime script will complain no finding of html element and quit.
 
   Thanks
 
   On 3月23日, 下午2时31分, Angrez Singh ang...@gmail.com wrote:
Can you make sure that pop up text is correct? Also can you post your
ruby/html code here so that we can help you better.
 
- Angrez
 
On Mon, Mar 23, 2009 at 7:37 AM, ajee ajee@gmail.com wrote:
 
 Hi all, I have searched the Internet for a long time on this topic,
 but there is no resolve I got. I know that somebody raises advice
 of
 using startClicker, but when I use it, no use:
 
 ff.startClicker(ok,1,'',The configuration on this page will
 reset
 all connections, are you sure to submit?)
 
 In order to know why, I managed to compile jssh.xpi, to get into
 firefox 3.0, adding some debug msg. By this, I saw jssh gets the
 correct msg of startClicker from firewatir,  proxied_shell-
 ExecuteBuffer return NS_OK. So I don't  know how to go on, with
 this
 popup javascript confirm window, Firefox can't proceed.
 


--~--~-~--~~~---~--~~
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: Count Open Browsers

2009-04-09 Thread mandeep baruah
require 'watir/process'
count_open_browser = Watir::IE.process_count

On Thu, Apr 9, 2009 at 12:53 PM, Isabel joybe...@gmail.com wrote:


 how do we use process_count() work??

 On Apr 9, 12:11 pm, Isabel joybe...@gmail.com wrote:
  Hi,
  Could anyone pleae let me know a way to count the number of browsers
  that are open on my system at run time??
 
  Thanks.
 


--~--~-~--~~~---~--~~
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: Tooltip text with overlib

2009-04-09 Thread Trevor

Additional HTML below:

tr
tdWhat is the name of this configuration?/td
td width=25 align=center
img  src=../images/help.gif onmouseover=return overlib
('The unique name of this configuration.') onmouseout=return nd();/

/td
tdinput type=text name=name value=
class=WorkspaceCommentEntry //td
/tr
tr

tdWhat is the description of this configuration?/td
td width=25 align=center
img  src=../images/help.gif onmouseover=return overlib
('A short description of this configuration. This property is
optional.') onmouseout=return nd();/
/td
tdinput type=text name=comment value=
class=WorkspaceCommentEntry //td
/tr


--~--~-~--~~~---~--~~
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: Error in handling popup

2009-04-09 Thread spike

sorry to tel u it isnt working,

ie.button(:id, ctl00_ContentPlaceHolder1_btnNext).click
ie.file_field(:id, ctl00_ContentPlaceHolder1_Uploadfile).set(D:\
\BCSBI.zip)
ie.file_field(:id, ctl00_ContentPlaceHolder1_btnUpload).click #this
is the button when clicked popup appears.
# For handling popups

def visible?
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

require 'win32ole'
def test_check_for_popups
autoit = WIN32OLE.new('AutoItx3.control')
loop do
  ret = autoit.WinWait('Windows Internet Explorer', '' ,1)
  if (ret==1) then autoit.sent('{enter}') end
  sleep(3)
end
end

#Below is the code for operations after the popup disappears
if ie.radio(:id,
ctl00_ContentPlaceHolder1_RdlistisFeedback_1).isSet?
puts IS FEEDBACK option Yes is selected
else
  ie.radio(:id,
ctl00_ContentPlaceHolder1_RdlistisFeedback_1).click
end
ie.select_list(:id, ctl00_ContentPlaceHolder1_DdlAccesstype).set
(Public)
ie.select_list(:id,
ctl00_ContentPlaceHolder1_DdlApprovaltype).set(Admin)

end
end



On Apr 9, 12:01 pm, kiran yajamanyam kiranyajaman...@gmail.com
wrote:
 hi Spike,

 Here is the perfect solution for you problem
 Copy paste the code present in the attached text file. And insted of using
 click() method use yourObject.mouse_click(36,6)  and remaing code will be
 same to handle that windows popup using autoit( Which I have posted in last
 mail).

 This is the only way u can handle this issue. It will definetly work.

 If you still have any issue send me the code you have pasted, i will correct
 it and send you back.

 Regards,
 Krian Y



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

  Yes i've used the click() method.

  On Apr 9, 11:09 am, kiran yajamanyam kiranyajaman...@gmail.com
  wrote:
   Now I got the problem you are facing. I think in your code u would have
  used
   click() method just before the code to handle popup. If this is the case
  ,
   script would not be coming out of click() method and go to next step.
  This
   happens in a case when when used click method and if a popup appears
  after
   click.

   please let me know if you have this issue. I have a work arround where in
  u
   need to extend your element class.

   You can ping me at kiranyajaman...@gmail.com if you have any issues with
   this. Try the following code once:

   Copy paste this code and use it. Check if its due to timing issue.

   require 'win32ole'

   autoit = WIN32OLE.new('AutoItX3.Control')

   autoit.WinWait('Windows Internet Explorer', '', 2)

   autoit.WinActivate('Windows Internet Explorer')
   autoit.Send('{space}')

   Regards,
   Kiran Y

   On Thu, Apr 9, 2009 at 11:29 AM, spike vinaykumarl...@gmail.com wrote:

Sorry sir even it is not working i've to click it manually to go
further in my test. wat about this autoit i've installed autoit-v3 how
is it related to watir..?

On Apr 9, 10:43 am, kiran yajamanyam kiranyajaman...@gmail.com
wrote:
 make sure that ur caption is same (Including caps) and if
 autoit.Send({'enter'}) is not working try with autoit.Send({'space'})

 On Thu, Apr 9, 2009 at 11:10 AM, spike vinaykumarl...@gmail.com
  wrote:

  if i'm clicking the OK button manually its going further to do
  rest
  of the operations or els its hung with the popup

[wtr-general] Re: Problem with watir (Radio Button)

2009-04-09 Thread Željko Filipin
Off topic, but I just love it when I can reply with just a link. :)

Željko

On Mon, Apr 6, 2009 at 08:17, Chuck van der Linden sqa...@gmail.com wrote:
 http://wiki.openqa.org/display/WTR/Frames

--~--~-~--~~~---~--~~
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] WATiR DSL I have been using

2009-04-09 Thread Ruf, Wadud
Hi
 
Over the last few months I have been using WATiR to test a web application
we have been developing. As a noob to both Ruby and WATiR (myself and the
rest of the project team), I have to say we have found WATiR to have a very
shallow learning curve.
 
To aide non-developers, and to increase our productivity I created an
internal domain specific language on top of WATiR, I call it WSL (WATiR
Scripting Language). This has proved to be a very positive step increasing
our productivity and lowering the barrier to using it.
 
I have a short screencast of an internal demo I gave on how I arrived at
WSL, and how to use it. This is from the perpective of a complete novice to
Ruby/WATiR available here - http://xqoob.com. The demo is a few months old
and WSL has evolved a bit more since then. 
 
I would like the WATiR community's feedback on this, as I would like to
open-source this, and would make the move sooner rather than later if there
is sufficient interest!
 
Thanks
 
Wadud
 
PS. The video may take a few seconds/minutes to start playing depending on
your connection speed.


Capgemini is a trading name used by the Capgemini Group of
companies which includes Capgemini UK plc, a company registered in
England and Wales (number 943935) whose registered office is at No.
1 Forge End, Woking, Surrey, GU21 6DB
/PREp style=font-family:arial;color:grey style=font-size:13pxThis 
message contains information that may be privileged or confidential and is the 
property of the Capgemini Group. It is intended only for the person to whom it 
is addressed. If you are not the intended recipient, you are not authorized to 
read, print, retain, copy, disseminate, distribute, or use this message or any 
part thereof. If you receive this message in error, please notify the sender 
immediately and delete all copies of this message./pPRE

--~--~-~--~~~---~--~~
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] trying to access text_field, but getting link instead?!?

2009-04-09 Thread Jarmo Pertman

Hi.

I stumbled into one interesting problem, which haven't happened
before. I tried to access text_field with id, and got link object
instead.

Here is my commands and output:
$browser.text_field(:id, info).value = test
unknown property or method: `value'
HRESULT error code:0x80020006
  Unknown name.
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/input_elements.rb:
349:in `method_missing'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/input_elements.rb:
349:in `value='


$browser.text_field(:id, info).html
A id=info class=someclassname href=\javascript:methodcall('param')
\my link/A

When doing .flash, then link is flashing indeed.

How is this even possible? There isn't actually any text_fields with
that id on that page. Why did Watir pick that link up just because it
had info as it's id?

Jarmo
--~--~-~--~~~---~--~~
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] IE crashes at end of test

2009-04-09 Thread andrew . dahl

Wondering if anyone ran into this and solved it. Had a machine which
has been running my tests fine for months. It was updated and rebooted
and now IE crashes about 50% of the time when closing the browser at
the end of a test. Prevents other tests from starting.

Windows XP
IE 7.0.5730.13
Watir 1.6.3
Watircraft 0.4.0
Running under VMWare

I have other machines with the exact same config that run fine. But I
have a Vista machine that also has this error (non-VMWare Vista box).

Have tried all the normal stuff, google no help. Has anyone else seen
this?

Here is the ugly error msg

IEEXPLORE.EXE – Application Error

The instruction at “0x0580715d” referenced memory at “0x8ccc0082”. The
memory could not be “written”.

Click on OK to terminate the program
Click on CANCEL to debug the program

Andrew
--~--~-~--~~~---~--~~
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: Error in handling popup

2009-04-09 Thread Jim Matthews

spike,

There is a problem with the new version of Ruby that may be
contributing to your problem.  I don't use autoit, I use method that
Lisa described.  For more information on the problem, see:

http://groups.google.com/group/watir-general/browse_thread/thread/c8e233ec27bebb85/02a19203ed99e262?lnk=gstq=%3Cpopup#02a19203ed99e262

Jim


On Apr 9, 5:09 am, spike vinaykumarl...@gmail.com wrote:
 sorry to tel u it isnt working,

 ie.button(:id, ctl00_ContentPlaceHolder1_btnNext).click
 ie.file_field(:id, ctl00_ContentPlaceHolder1_Uploadfile).set(D:\
 \BCSBI.zip)
 ie.file_field(:id, ctl00_ContentPlaceHolder1_btnUpload).click #this
 is the button when clicked popup appears.
 # For handling popups

     def visible?
     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

 require 'win32ole'
 def test_check_for_popups
 autoit = WIN32OLE.new('AutoItx3.control')
 loop do
   ret = autoit.WinWait('Windows Internet Explorer', '' ,1)
   if (ret==1) then autoit.sent('{enter}') end
   sleep(3)
 end
 end

 #Below is the code for operations after the popup disappears
 if ie.radio(:id,
 ctl00_ContentPlaceHolder1_RdlistisFeedback_1).isSet?
     puts IS FEEDBACK option Yes is selected
     else
       ie.radio(:id,
 ctl00_ContentPlaceHolder1_RdlistisFeedback_1).click
     end
     ie.select_list(:id, ctl00_ContentPlaceHolder1_DdlAccesstype).set
 (Public)
     ie.select_list(:id,
 ctl00_ContentPlaceHolder1_DdlApprovaltype).set(Admin)

 end
 end

 On Apr 9, 12:01 pm, kiran yajamanyam kiranyajaman...@gmail.com
 wrote:

  hi Spike,

  Here is the perfect solution for you problem
  Copy paste the code present in the attached text file. And insted of using
  click() method use yourObject.mouse_click(36,6)  and remaing code will be
  same to handle that windows popup using autoit( Which I have posted in last
  mail).

  This is the only way u can handle this issue. It will definetly work.

  If you still have any issue send me the code you have pasted, i will correct
  it and send you back.

  Regards,
  Krian Y

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

   Yes i've used the click() method.

   On Apr 9, 11:09 am, kiran yajamanyam kiranyajaman...@gmail.com
   wrote:
Now I got the problem you are facing. I think in your code u would have
   used
click() method just before the code to handle popup. If this is the case
   ,
script would not be coming out of click() method and go to next step.
   This
happens in a case when when used click method and if a popup appears
   after
click.

please let me know if you have this issue. I have a work arround where 
in
   u
need to extend your element class.

You can ping me at kiranyajaman...@gmail.com if you have any issues with
this. Try the following code once:

Copy paste this code and use it. Check if its due to timing issue.

require 'win32ole'

autoit = WIN32OLE.new('AutoItX3.Control')

autoit.WinWait('Windows Internet Explorer', '', 2)

autoit.WinActivate('Windows Internet Explorer')
autoit.Send('{space}')

Regards,
Kiran Y

On Thu, Apr 9, 2009 at 11:29 AM, spike vinaykumarl...@gmail.com wrote:

 Sorry sir even it is not working i've to click it manually to go
 

[wtr-general] Re: FireWatir 1.6.2 unittests don't run

2009-04-09 Thread Moochie

Paul,

Did you ever update the wiki?  I'm not finding you direction sto get
passed this issue, and since I'm hitting the issue, and believe others
will.  It would be nice to help other so the will not get a
frustrated.

Many thanks,

Darin

On Apr 7, 12:14 am, Paul Carvalho tester.p...@gmail.com wrote:
 I opened Jira ticket #WTR-301 to address the problem.  I'll look over
 the wiki information again and see what I can do to help clarify the
 steps to get up and running until the problem is addressed in a future
 gem release/install.  The present wiki information seems to be really
 geared towards developers, which is a big turn-off for me. ;)

 Cheers.  Paul C.

 (BTW, I apologised to Al off-list for my prior post.  I didn't mean to
 harsh on him.. I was just frustrated at the time I spent trying to
 resolve the problem when the only advice I could find on the wiki said
 that I need to Get the source code and unit tests from SVN.  To me,
 asking a tester to install development tools to retrieve development
 source to make something work just seems like the wrong way to go, you
 know?  Ah well, such is life sometimes in the Open Source world. ;)
 Keep moving forward.)

 On Apr 6, 11:27 am, Bret Pettichord b...@pettichord.com wrote:

  Paul,

  Could you update the wiki with this information please?

  Bret
--~--~-~--~~~---~--~~
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: WATiR DSL I have been using

2009-04-09 Thread Bret Pettichord

Thanks for sharing your work. I found it to be very interesting.

Bret


Ruf, Wadud wrote:
 Hi
  
 Over the last few months I have been using WATiR to test a web 
 application we have been developing. As a noob to both Ruby and WATiR 
 (myself and the rest of the project team), I have to say we have found 
 WATiR to have a very shallow learning curve.
  
 To aide non-developers, and to increase our productivity I created an 
 internal domain specific language on top of WATiR, I call it WSL 
 (WATiR Scripting Language). This has proved to be a very positive step 
 increasing our productivity and lowering the barrier to using it.
  
 I have a short screencast of an internal demo I gave on how I arrived 
 at WSL, and how to use it. This is from the perpective of a complete 
 novice to Ruby/WATiR available here - http://xqoob.com. The demo is a 
 few months old and WSL has evolved a bit more since then.
  
 I would like the WATiR community's feedback on this, as I would like 
 to open-source this, and would make the move sooner rather than later 
 if there is sufficient interest!
  
 Thanks
  
 Wadud
  
 PS. The video may take a few seconds/minutes to start playing 
 depending on your connection speed.


-- 
Bret Pettichord
CTO, WatirCraft LLC, www.watircraft.com
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord

Watir Training: Portland/Beaverton April 16-17
www.watircraft.com/training


--~--~-~--~~~---~--~~
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: trying to access text_field, but getting link instead?!?

2009-04-09 Thread Bret Pettichord

That's actually a bug I've known about in Watir, but i think this is the 
first time some one has reported it. It was introduced when we did some 
performance optimizations some time ago.

Bret

Jarmo Pertman wrote:
 Hi.

 I stumbled into one interesting problem, which haven't happened
 before. I tried to access text_field with id, and got link object
 instead.

 Here is my commands and output:
 $browser.text_field(:id, info).value = test
 unknown property or method: `value'
 HRESULT error code:0x80020006
   Unknown name.
 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/input_elements.rb:
 349:in `method_missing'
 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/input_elements.rb:
 349:in `value='


 $browser.text_field(:id, info).html
 A id=info class=someclassname href=\javascript:methodcall('param')
 \my link/A

 When doing .flash, then link is flashing indeed.

 How is this even possible? There isn't actually any text_fields with
 that id on that page. Why did Watir pick that link up just because it
 had info as it's id?

 Jarmo
 
   


-- 
Bret Pettichord
CTO, WatirCraft LLC, www.watircraft.com
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord

Watir Training: Portland/Beaverton April 16-17
www.watircraft.com/training


--~--~-~--~~~---~--~~
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: trying to access text_field, but getting link instead?!?

2009-04-09 Thread Chuck van der Linden

I think you are calling the wrong method for what it looks like you
are trying to do.

.value  returns the current value in the text field..

to set the text field to a particular string you want .set

current_text = browser.text_field(:id, info).value  #get the text
field contents
puts browser.text_field(:id, info).value#display the
current text field contents
browser.text_field(:id, info).set = test  #set the
text field contents


On Apr 9, 4:27 am, Jarmo Pertman jarm...@gmail.com wrote:
 Hi.

 I stumbled into one interesting problem, which haven't happened
 before. I tried to access text_field with id, and got link object
 instead.

 Here is my commands and output:
 $browser.text_field(:id, info).value = test
 unknown property or method: `value'
     HRESULT error code:0x80020006
       Unknown name.
 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/input_elements.rb:
 349:in `method_missing'
 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/input_elements.rb:
 349:in `value='

 $browser.text_field(:id, info).html
 A id=info class=someclassname href=\javascript:methodcall('param')
 \my link/A

 When doing .flash, then link is flashing indeed.

 How is this even possible? There isn't actually any text_fields with
 that id on that page. Why did Watir pick that link up just because it
 had info as it's id?

 Jarmo
--~--~-~--~~~---~--~~
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: WATiR DSL I have been using

2009-04-09 Thread Ruf, Wadud
Thanks Brett,
 
Looking at the video again it is quite dated, I need to get some up to date
material on there. The main principle is simplicity over power. Once I have
better material to upload I will post a link.
 
Wadud



From: watir-general@googlegroups.com on behalf of Bret Pettichord
Sent: Thu 09/04/2009 16:49
To: watir-general@googlegroups.com
Subject: [wtr-general] Re: WATiR DSL I have been using




Thanks for sharing your work. I found it to be very interesting.

Bret


Ruf, Wadud wrote:
 Hi
 
 Over the last few months I have been using WATiR to test a web
 application we have been developing. As a noob to both Ruby and WATiR
 (myself and the rest of the project team), I have to say we have found
 WATiR to have a very shallow learning curve.
 
 To aide non-developers, and to increase our productivity I created an
 internal domain specific language on top of WATiR, I call it WSL
 (WATiR Scripting Language). This has proved to be a very positive step
 increasing our productivity and lowering the barrier to using it.
 
 I have a short screencast of an internal demo I gave on how I arrived
 at WSL, and how to use it. This is from the perpective of a complete
 novice to Ruby/WATiR available here - http://xqoob.com http://xqoob.com/
. The demo is a
 few months old and WSL has evolved a bit more since then.
 
 I would like the WATiR community's feedback on this, as I would like
 to open-source this, and would make the move sooner rather than later
 if there is sufficient interest!
 
 Thanks
 
 Wadud
 
 PS. The video may take a few seconds/minutes to start playing
 depending on your connection speed.


--
Bret Pettichord
CTO, WatirCraft LLC, www.watircraft.com
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord

Watir Training: Portland/Beaverton April 16-17
www.watircraft.com/training








Capgemini is a trading name used by the Capgemini Group of
companies which includes Capgemini UK plc, a company registered in
England and Wales (number 943935) whose registered office is at No.
1 Forge End, Woking, Surrey, GU21 6DB
/PREp style=font-family:arial;color:grey style=font-size:13pxThis 
message contains information that may be privileged or confidential and is the 
property of the Capgemini Group. It is intended only for the person to whom it 
is addressed. If you are not the intended recipient, you are not authorized to 
read, print, retain, copy, disseminate, distribute, or use this message or any 
part thereof. If you receive this message in error, please notify the sender 
immediately and delete all copies of this message./pPRE

--~--~-~--~~~---~--~~
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: Popup for File downlaods

2009-04-09 Thread ANu Gangavaram
I was running into similar problem.  I seperated the scripts - main script
and save script.  I call the save script from the main script using a system
call and send the filename as an argument and it works.  You can also have
it in the same file, but seperate the code and instantiate each differently
and it should work.  I guess the main idea is that each runs in a different
process.

system(ruby SaveFile.rb +$ddt_rptPDFName)

My save script looks something like below:
$rptPDFName = ARGV[0]
  def test_Save
sleep 5
   ai = WIN32OLE.new(AutoItX3.Control)
   ai.WinWait(File Download, , 5)
   ai.ControlFocus(File Download, , Save)
   sleep 3
   ai.ControlClick(File Download, , Save)
   ai.ControlClick(File Download, , Save)
   ai.WinWait(Save As, , 5)
   sleep 1
   ai.ControlSend(Save As, , Edit1,$rptPDFName)
   ai.ControlClick(Save As, , Save, left)
   ai.WinWait(Download complete, , 5)
   ai.ControlClick(Download complete, , Close)
 end

 Also, when you click on the button or object that invokes the download
pop-up, use the function click_no_wait e.g.
$browser.button(:class = 'submitbtn', :index =1).click_no_wait




On Tue, Apr 7, 2009 at 11:39 PM, spike vinaykumarl...@gmail.com wrote:


 Hi

 I'm really confused working with Pop Up's i'm not able to find any
 solution for it wat ever script i'm trying its not working for me.

 The following is the script i used for a file downlaod popup

 prompt_message = Do you want to open or save this file?
 window_title = File Download
 save_dialog = WIN32OLE.new(AutoItX3.Control)
 sleep 1
 save_dialog_obtained = save_dialog.WinWaitActive
 (window_title,prompt_message, 25)
 save_dialog.ControlFocus(window_title, prompt_message, Save)
 sleep 1
 save_dialog.Send(S)
 save_dialog.ControlClick(window_title, prompt_message, Save)
 save_dialog.WinSetTitle(window_title, prompt_message, This is
 ForTesting )
 saveas_dialog_obtained = save_dialog.WinWait(Save As, Savein, 5)
 sleep 1
 path = File.dirname(__FILE__).gsub(/ , \\ )+ \\ + fileName
 save_dialog.ControlSend(Save As, , Edit1,path)
 sleep 4
 save_dialog.ControlClick(Save As, Save in, Save)
 save_fileAlreadyExists = save_dialog.WinWait(Save As,  , 5)

 But it isnt working for me,
 I have the following doubts
 Should i run the popup script in seperate file?
 Should i include the popup script in the Main script itself at the
 position where popup occurs?

 Please give me solution to the above problem and also clear my doubts.
 Suggest me any tutorial for popup which is easy to understand and has
 good descritpiton about handling popup's.

 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

2009-04-09 Thread ANu Gangavaram
Can you please give more details on what you were trying to do?

On Wed, Apr 8, 2009 at 1:58 AM, spike vinaykumarl...@gmail.com wrote:


 Hi

 I'm tried to run Popups_test.rb script but its not working im getting
 the following error

 C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
 `gem_original_require': no such file to load -- unittests/setup
 (LoadError)
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
 `require'
from popups_test.rb:4

 suggest me a solution

 thanking yu
 


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

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: Popup for File downlaods

2009-04-09 Thread Chuck van der Linden

I many cases, the most important thing to understand when dealing with
popups is to know what KIND of popup you are seeing.

The tutorial for Watir covers most of the common kinds of popups, and
gives some suggestions of potential ways to deal with each of them.

Even if you've been through it once, I recommend repeating that
section and pay particular attention to the descriptions of the types
of popup windows, and try to figure out which type you are faced
with.   Once you know you are a lot closer to a solution


On Apr 9, 10:48 am, ANu Gangavaram anuwri...@gmail.com wrote:
 I was running into similar problem.  I seperated the scripts - main script
 and save script.  I call the save script from the main script using a system
 call and send the filename as an argument and it works.  You can also have
 it in the same file, but seperate the code and instantiate each differently
 and it should work.  I guess the main idea is that each runs in a different
 process.

 system(ruby SaveFile.rb +$ddt_rptPDFName)

 My save script looks something like below:
 $rptPDFName = ARGV[0]
   def test_Save
     sleep 5
    ai = WIN32OLE.new(AutoItX3.Control)
    ai.WinWait(File Download, , 5)
    ai.ControlFocus(File Download, , Save)
    sleep 3
    ai.ControlClick(File Download, , Save)
    ai.ControlClick(File Download, , Save)
    ai.WinWait(Save As, , 5)
    sleep 1
    ai.ControlSend(Save As, , Edit1,$rptPDFName)
    ai.ControlClick(Save As, , Save, left)
    ai.WinWait(Download complete, , 5)
    ai.ControlClick(Download complete, , Close)
  end

  Also, when you click on the button or object that invokes the download
 pop-up, use the function click_no_wait e.g.
 $browser.button(:class = 'submitbtn', :index =1).click_no_wait



 On Tue, Apr 7, 2009 at 11:39 PM, spike vinaykumarl...@gmail.com wrote:

  Hi

  I'm really confused working with Pop Up's i'm not able to find any
  solution for it wat ever script i'm trying its not working for me.

  The following is the script i used for a file downlaod popup

  prompt_message = Do you want to open or save this file?
  window_title = File Download
  save_dialog = WIN32OLE.new(AutoItX3.Control)
  sleep 1
  save_dialog_obtained = save_dialog.WinWaitActive
  (window_title,prompt_message, 25)
  save_dialog.ControlFocus(window_title, prompt_message, Save)
  sleep 1
  save_dialog.Send(S)
  save_dialog.ControlClick(window_title, prompt_message, Save)
  save_dialog.WinSetTitle(window_title, prompt_message, This is
  ForTesting )
  saveas_dialog_obtained = save_dialog.WinWait(Save As, Savein, 5)
  sleep 1
  path = File.dirname(__FILE__).gsub(/ , \\ )+ \\ + fileName
  save_dialog.ControlSend(Save As, , Edit1,path)
  sleep 4
  save_dialog.ControlClick(Save As, Save in, Save)
  save_fileAlreadyExists = save_dialog.WinWait(Save As,  , 5)

  But it isnt working for me,
  I have the following doubts
  Should i run the popup script in seperate file?
  Should i include the popup script in the Main script itself at the
  position where popup occurs?

  Please give me solution to the above problem and also clear my doubts.
  Suggest me any tutorial for popup which is easy to understand and has
  good descritpiton about handling popup's.

  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] Yahoo mail, creating a new email message.

2009-04-09 Thread cboudreau

Has anyone been able to create a new yahoo email in the new UI?

Carl

--~--~-~--~~~---~--~~
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: Yahoo mail, creating a new email message.

2009-04-09 Thread Chuck van der Linden

sounds like a yahoo question.   what does this have to do with Watir?

On Apr 9, 11:05 am, cboudreau carlboudreau...@gmail.com wrote:
 Has anyone been able to create a new yahoo email in the new UI?

 Carl
--~--~-~--~~~---~--~~
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: IE crashes at end of test

2009-04-09 Thread Chuck van der Linden

if this is easily reproducable, especially if it's running on a VM
(which makes it easy to share the repro case) it might be something
you need to take up with MS..

You might want to do some simple resource monitoring, make sure it's
not a memory leak or something..  Like run permon on another system,
or taskman on the local box and monitor free memory..   We have had a
number of folks complaining that in prolonged tests IE can end up
using a lot of memory.. (weither that's an actual IE issue, or a java
memory leak I don't know, and it can be tricky to tell the two apart)

On Apr 9, 7:27 am, andrew.d...@lthree.com wrote:
 Wondering if anyone ran into this and solved it. Had a machine which
 has been running my tests fine for months. It was updated and rebooted
 and now IE crashes about 50% of the time when closing the browser at
 the end of a test. Prevents other tests from starting.

 Windows XP
 IE 7.0.5730.13
 Watir 1.6.3
 Watircraft 0.4.0
 Running under VMWare

 I have other machines with the exact same config that run fine. But I
 have a Vista machine that also has this error (non-VMWare Vista box).

 Have tried all the normal stuff, google no help. Has anyone else seen
 this?

 Here is the ugly error msg

 IEEXPLORE.EXE – Application Error

 The instruction at “0x0580715d” referenced memory at “0x8ccc0082”. The
 memory could not be “written”.

 Click on OK to terminate the program
 Click on CANCEL to debug the program

 Andrew
--~--~-~--~~~---~--~~
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: Error in handling popup

2009-04-09 Thread Chuck van der Linden

I many cases, the most important thing to understand when dealing
with
popups is to know what KIND of popup you are seeing.

The tutorial for Watir covers most of the common kinds of popups, and
gives some suggestions of potential ways to deal with each of them.


Even if you've been through it once, I recommend repeating that
section and pay particular attention to the descriptions of the types
of popup windows, and try to figure out which type you are faced
with.   Once you know you are a lot closer to a solution as it allows
us to narrow things down a bit and rule out approaches that are known
to not work with that kind of popup

--~--~-~--~~~---~--~~
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: Yahoo mail, creating a new email message.

2009-04-09 Thread cboudreau

I am new to this Watir, and having some difficulty figuring this out.

I thought I would be starting something easy, by logging into Yahoo
and then creating a new email. However I can not get the Xpath line to
work.

#Include the FireWatir file.

require 'firewatir'

#include the FireWatir Module.

include FireWatir

ff=Firefox.new

#Open yahoo mail.

ff.goto(http://mail. yahoo.com)

#Put your user name.

ff.text_field( :name,login ).set(username )

#Put your password.

ff.text_field( :name,passwd ).set(password )

#Click Sign In button.

ff.button(:value, Sign In).click

# Locate the table cell element on the page.

ff.cell(:xpath, //td[contains( text, 'New')]/).click

#Click Sign Out button.

#ff.link(:text, Sign Out).click

#Close the browser.

#ff.close




--~--~-~--~~~---~--~~
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: Error in handling popup

2009-04-09 Thread Anu Gangavaram
Since you are able to run the script, after clicking on the button manually,
it could be a timing issue.  you might want to check that as well.

On Thu, Apr 9, 2009 at 2:26 PM, Chuck van der Linden sqa...@gmail.comwrote:


 I many cases, the most important thing to understand when dealing
 with
 popups is to know what KIND of popup you are seeing.

 The tutorial for Watir covers most of the common kinds of popups, and
 gives some suggestions of potential ways to deal with each of them.


 Even if you've been through it once, I recommend repeating that
 section and pay particular attention to the descriptions of the types
 of popup windows, and try to figure out which type you are faced
 with.   Once you know you are a lot closer to a solution as it allows
 us to narrow things down a bit and rule out approaches that are known
 to not work with that kind of popup

 


--~--~-~--~~~---~--~~
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: Go on performance test using script.

2009-04-09 Thread Chuck van der Linden

There's been a few threads on this here in just the last week.  I'd
start by searching them.

Briefly (and this is just my opinion)

1) I think watir has a lot of potential for use in basic performance
tests because it's very easy to get the response time for each page in
the test.

2) tools like Fiddler2 are also very useful as they break things down
and give you individual response time numbers for all of the requests
that make up the entire page.  this could be done in conjunction with
an automated test.  (you wouldn't actually need to modify the test at
all, just run fiddler, and then run the test, then review the fiddler
data to get your performance numbers.

3) for true loadtesting, provided you are going against windows
servers, I happen to really like Microsoft Visual Studio2008 (in
either Test Edition or Team Suite flavors) which allows highly
instrumented protocol level loadtesting for a fraction of the cost of
tools like LoadRunner.  you get very detailed breakdowns of the times
it took to load the pages, corrrilated vs the load, and also detailed
data on how that load affected your servers.

VSTS could also be used to test against non windows servers, but you
will need to find another means to instrument the effect of the load
on the servers since I know of no linux drivers or daemons that expose
performance counter data via the DMTF WBEM standard.

4) there are other protocol level tools out there, but I'll leave
others to speak to them (and they have in the other threads) because
I'm not familiar with them.

5) if you are not yet running a production site, and/or have the
internet pipes to spare, there are also the options of 'cloud' based
services to generate your load.

On Apr 8, 6:58 pm, Wesley Chen cjq@gmail.com wrote:
 Hi, All,
 I have heard that, we can go on performance test, such as load/stress test
 by script.
 So I would like to study one script language for it.

 I think in this great Watir general group, there are many testers going on
 performance testing.
 Any of you do the performance testing by manual script?

 It is said that, python, jython by frame Grinder may be good.

 Which script would be perfect to choose for the performance test?
 Can you guys show your opinion and some documents/articles links?

 Thanks.
 Wesley Chen.
--~--~-~--~~~---~--~~
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: Popup for File downlaods

2009-04-09 Thread Chuck van der Linden

You now have at least FOUR threads going for the same issue, it's just
causing confusion.  Please STOP spawning new threads for the same
issue.

On Apr 7, 8:39 pm, spike vinaykumarl...@gmail.com wrote:
 Hi

 I'm really confused working with Pop Up's i'm not able to find any
 solution for it wat ever script i'm trying its not working for me.

 The following is the script i used for a file downlaod popup

 prompt_message = Do you want to open or save this file?
 window_title = File Download
 save_dialog = WIN32OLE.new(AutoItX3.Control)
 sleep 1
 save_dialog_obtained = save_dialog.WinWaitActive
 (window_title,prompt_message, 25)
 save_dialog.ControlFocus(window_title, prompt_message, Save)
 sleep 1
 save_dialog.Send(S)
 save_dialog.ControlClick(window_title, prompt_message, Save)
 save_dialog.WinSetTitle(window_title, prompt_message, This is
 ForTesting )
 saveas_dialog_obtained = save_dialog.WinWait(Save As, Savein, 5)
 sleep 1
 path = File.dirname(__FILE__).gsub(/ , \\ )+ \\ + fileName
 save_dialog.ControlSend(Save As, , Edit1,path)
 sleep 4
 save_dialog.ControlClick(Save As, Save in, Save)
 save_fileAlreadyExists = save_dialog.WinWait(Save As,  , 5)

 But it isnt working for me,
 I have the following doubts
 Should i run the popup script in seperate file?
 Should i include the popup script in the Main script itself at the
 position where popup occurs?

 Please give me solution to the above problem and also clear my doubts.
 Suggest me any tutorial for popup which is easy to understand and has
 good descritpiton about handling popup's.

 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: Yahoo mail, creating a new email message.

2009-04-09 Thread Michael Hwee


Check that it could be in a frame.


- Original Message 
From: cboudreau carlboudreau...@gmail.com
To: Watir General watir-general@googlegroups.com
Sent: Thursday, April 9, 2009 11:32:56 AM
Subject: [wtr-general] Re: Yahoo mail, creating a new email message.


I am new to this Watir, and having some difficulty figuring this out.

I thought I would be starting something easy, by logging into Yahoo
and then creating a new email. However I can not get the Xpath line to
work.

#Include the FireWatir file.

require 'firewatir'

#include the FireWatir Module.

include FireWatir

ff=Firefox.new

#Open yahoo mail.

ff.goto(http://mail. yahoo.com)

#Put your user name.

ff.text_field( :name,login ).set(username )

#Put your password.

ff.text_field( :name,passwd ).set(password )

#Click Sign In button.

ff.button(:value, Sign In).click

# Locate the table cell element on the page.

ff.cell(:xpath, //td[contains( text, 'New')]/).click

#Click Sign Out button.

#ff.link(:text, Sign Out).click

#Close the browser.

#ff.close





--~--~-~--~~~---~--~~
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: Yahoo mail, creating a new email message.

2009-04-09 Thread Al Snow

Carl,

This works for me (after you put your login and password ;).

require 'firewatir'
include FireWatir

ff=Firefox.new

ff.goto(http://mail.yahoo.com;)
ff.text_field( :name,login ).set(PUT LOGIN HERE )
ff.text_field( :name,passwd ).set(PUT PASSWORD HERE )
ff.button(:value, Sign In).click

#ff.cell(:xpath, //td[contains( text, 'New')]/).click

ff.link(:text, Sign Out).click
ff.close

Thanks,
Al Snow
Linkedin: http://www.linkedin.com/in/alsnow
Google Talk: jasnow1
Twitter: jasnow

 Date: Thu, 9 Apr 2009 11:32:56 -0700
 Subject: [wtr-general] Re: Yahoo mail, creating a new email message.
 From: carlboudreau...@gmail.com
 To: watir-general@googlegroups.com
 
 
 I am new to this Watir, and having some difficulty figuring this out.
 
 I thought I would be starting something easy, by logging into Yahoo
 and then creating a new email. However I can not get the Xpath line to
 work.
 
 #Include the FireWatir file.
 
 require 'firewatir'
 
 #include the FireWatir Module.
 
 include FireWatir
 
 ff=Firefox.new
 
 #Open yahoo mail.
 
 ff.goto(http://mail. yahoo.com)
 
 #Put your user name.
 
 ff.text_field( :name,login ).set(username )
 
 #Put your password.
 
 ff.text_field( :name,passwd ).set(password )
 
 #Click Sign In button.
 
 ff.button(:value, Sign In).click
 
 # Locate the table cell element on the page.
 
 ff.cell(:xpath, //td[contains( text, 'New')]/).click
 
 #Click Sign Out button.
 
 #ff.link(:text, Sign Out).click
 
 #Close the browser.
 
 #ff.close
 
 
 
 
  

_
Rediscover Hotmail®: Get e-mail storage that grows with you. 
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage1_042009
--~--~-~--~~~---~--~~
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: Yahoo mail, creating a new email message.

2009-04-09 Thread cboudreau

Hi Al,

your sample didn't work.

I uncommented the  #ff.cell(:xpath, //td[contains( text,
'New')]/).click

I can log in with firewatir, but not get firewatir to click new to
open the email editor in Yahoo.





On Apr 9, 1:55 pm, Al Snow jas...@hotmail.com wrote:
 Carl,

 This works for me (after you put your login and password ;).

 require 'firewatir'
 include FireWatir

 ff=Firefox.new

 ff.goto(http://mail.yahoo.com;)
 ff.text_field( :name,login ).set(PUT LOGIN HERE )
 ff.text_field( :name,passwd ).set(PUT PASSWORD HERE )
 ff.button(:value, Sign In).click

 #ff.cell(:xpath, //td[contains( text, 'New')]/).click

 ff.link(:text, Sign Out).click
 ff.close

 Thanks,
 Al Snow
 Linkedin:http://www.linkedin.com/in/alsnow
 Google Talk: jasnow1
 Twitter: jasnow





  Date: Thu, 9 Apr 2009 11:32:56 -0700
  Subject: [wtr-general] Re: Yahoo mail, creating a new email message.
  From: carlboudreau...@gmail.com
  To: watir-general@googlegroups.com

  I am new to this Watir, and having some difficulty figuring this out.

  I thought I would be starting something easy, by logging into Yahoo
  and then creating a new email. However I can not get the Xpath line to
  work.

  #Include the FireWatir file.

  require 'firewatir'

  #include the FireWatir Module.

  include FireWatir

  ff=Firefox.new

  #Open yahoo mail.

  ff.goto(http://mail. yahoo.com)

  #Put your user name.

  ff.text_field( :name,login ).set(username )

  #Put your password.

  ff.text_field( :name,passwd ).set(password )

  #Click Sign In button.

  ff.button(:value, Sign In).click

  # Locate the table cell element on the page.

  ff.cell(:xpath, //td[contains( text, 'New')]/).click

  #Click Sign Out button.

  #ff.link(:text, Sign Out).click

  #Close the browser.

  #ff.close

 _
 Rediscover Hotmail®: Get e-mail storage that grows with 
 you.http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Redisco...- 
 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

2009-04-09 Thread George

Wow


On Apr 7, 10:58 pm, spike vinaykumarl...@gmail.com wrote:
 Hi

 I'm tried to run Popups_test.rb script but its not working im getting
 the following error

 C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
 `gem_original_require': no such file to load -- unittests/setup
 (LoadError)
         from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
 `require'
         from popups_test.rb:4

 suggest me a solution

 thanking yu
--~--~-~--~~~---~--~~
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: WATiR DSL I have been using

2009-04-09 Thread Charley Baker
It does look really interesting, particularly the manual intervention, we
have something similar, not intervention per se, but specifying manual tests
with ruby, not Quality Center. There seems to be a proliferation of
frameworks popping up around Watir lately which is a good thing. If you're
interested in releasing your framework, I'd suggest putting it on github,
and mailing the list when it's up.


Charley Baker
blog: http://blog.charleybaker.org/
Lead Developer, Watir, http://wtr.rubyforge.org
QA Architect, Gap Inc Direct


On Thu, Apr 9, 2009 at 11:44 AM, Ruf, Wadud wadud@capgemini.com wrote:

  Thanks Brett,

 Looking at the video again it is quite dated, I need to get some up to date
 material on there. The main principle is simplicity over power. Once I have
 better material to upload I will post a link.

 Wadud

 --
 *From:* watir-general@googlegroups.com on behalf of Bret Pettichord
 *Sent:* Thu 09/04/2009 16:49
 *To:* watir-general@googlegroups.com
 *Subject:* [wtr-general] Re: WATiR DSL I have been using


 Thanks for sharing your work. I found it to be very interesting.

 Bret


 Ruf, Wadud wrote:
  Hi
 
  Over the last few months I have been using WATiR to test a web
  application we have been developing. As a noob to both Ruby and WATiR
  (myself and the rest of the project team), I have to say we have found
  WATiR to have a very shallow learning curve.
 
  To aide non-developers, and to increase our productivity I created an
  internal domain specific language on top of WATiR, I call it WSL
  (WATiR Scripting Language). This has proved to be a very positive step
  increasing our productivity and lowering the barrier to using it.
 
  I have a short screencast of an internal demo I gave on how I arrived
  at WSL, and how to use it. This is from the perpective of a complete
  novice to Ruby/WATiR available here - http://xqoob.com. The demo is a
  few months old and WSL has evolved a bit more since then.
 
  I would like the WATiR community's feedback on this, as I would like
  to open-source this, and would make the move sooner rather than later
  if there is sufficient interest!
 
  Thanks
 
  Wadud
 
  PS. The video may take a few seconds/minutes to start playing
  depending on your connection speed.


 --
 Bret Pettichord
 CTO, WatirCraft LLC, www.watircraft.com
 Lead Developer, Watir, www.watir.com
 Blog, www.io.com/~wazmo/blog http://www.io.com/%7Ewazmo/blog
 Twitter, www.twitter.com/bpettichord

 Watir Training: Portland/Beaverton April 16-17
 www.watircraft.com/training



 
 Capgemini is a trading name used by the Capgemini Group of companies which
 includes Capgemini UK plc, a company registered in England and Wales (number
 943935) whose registered office is at No. 1 Forge End, Woking, Surrey, GU21
 6DB

 This message contains information that may be privileged or confidential
 and is the property of the Capgemini Group. It is intended only for the
 person to whom it is addressed. If you are not the intended recipient, you
 are not authorized to read, print, retain, copy, disseminate, distribute, or
 use this message or any part thereof. If you receive this message in error,
 please notify the sender immediately and delete all copies of this message.




--~--~-~--~~~---~--~~
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: Posting invalid form data with Watir

2009-04-09 Thread Chuck van der Linden

not sure there is an easy way around this with Watir itself, since
it's designed to drive the browser like a user would.

Seems like for this kind of spoofing, where you are sending something
that the browser won't normally allow, there are a couple of options.

you already talked about using something to handcraft the requests,
and I presume you know about saving a page locally, modifying it and
then running it to submit invalid requests.

You could also use a protocol level tool like Fiddler2 to capture the
traffic, then modify and replay the request.. which is faster and
easier and really good for quick off the cuff tests, but not really
what you are looking for..

So I think what you'd want to do is look into protocol level
scripting, which can be done with Ruby (or python and I think perl).
The book 'Everyday Scripting with Ruby') has an example of creating a
class to send a HTTP post request on page 151 (I just pulled down my
copy and looked it up in the index)..

The O'Reilly Ruby Cookbook also has a few pages worth of stuff
dealing with HTTP as well.

What would be nice of course (and I've no idea if this is possible)
would be to have a way to direct the response from the request into a
browser session, so you could use watir to evaluate how the server
responded to the invalid data, but I expect you're likely to have to
parse through it manually.

On Apr 8, 5:40 pm, Paul Denize paul.den...@datacom.co.nz wrote:
 In previous versions of watir I used to send 11 characters to a field
 that had a maxlimit of 10.  This would ensure the server also checked
 the parameter and did something sensible (truncate or error message).

 The newer version seems a bit safer and ie.text_field (:index,1).set
 (01234567890) just truncates the input to the maxlength.  Ok I
 accept that and found I could use ie.text_field (:index,
 1).value=01234567890 in the instances where I wanted to do the
 server side validation.

 NOW THE PROBLEM

 How do I do that for a combo box?

 I want to send a value that is not in the list of options.  One way
 might be to add the item and then send it (sorta the same thing I
 guess).  In any case the server should again check and handle this.

 And I bet the next question I ask will be around Radios and
 Checkboxes?  Setting/sending invalid values.

 BACKGROUND

 For those unfamiliar with OWASP threats (google that) and see that
 this is amongst the most common vulnerabilities in security.  You
 cannot assume the web browser will safeguard inputs.  In fact till now
 we have manually used Firefox and Tamperdata to do this.  But the task
 is very difficult and time consuming - So I want to automate these
 tests too.
--~--~-~--~~~---~--~~
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: Yahoo mail, creating a new email message.

2009-04-09 Thread Chuck van der Linden

1) have you worked through the watir tutorial?  that might be a good
place to start.

2) have you looked at the object in question with something like
firebug or IE developer toolbar to see if it's still part of a table,
and not changed to perhaps just be in a div or perhaps a frame
instead?  Maybe it's just a link now and much easier to get to?

3) what is the error you are getting?  that will tell you (and us) a
lot more about how it's failing.

On Apr 9, 12:15 pm, cboudreau carlboudreau...@gmail.com wrote:
 Hi Al,

 your sample didn't work.

 I uncommented the  #ff.cell(:xpath, //td[contains( text,
 'New')]/).click

 I can log in with firewatir, but not get firewatir to click new to
 open the email editor in Yahoo.

 On Apr 9, 1:55 pm, Al Snow jas...@hotmail.com wrote:



  Carl,

  This works for me (after you put your login and password ;).

  require 'firewatir'
  include FireWatir

  ff=Firefox.new

  ff.goto(http://mail.yahoo.com;)
  ff.text_field( :name,login ).set(PUT LOGIN HERE )
  ff.text_field( :name,passwd ).set(PUT PASSWORD HERE )
  ff.button(:value, Sign In).click

  #ff.cell(:xpath, //td[contains( text, 'New')]/).click

  ff.link(:text, Sign Out).click
  ff.close

  Thanks,
  Al Snow
  Linkedin:http://www.linkedin.com/in/alsnow
  Google Talk: jasnow1
  Twitter: jasnow

   Date: Thu, 9 Apr 2009 11:32:56 -0700
   Subject: [wtr-general] Re: Yahoo mail, creating a new email message.
   From: carlboudreau...@gmail.com
   To: watir-general@googlegroups.com

   I am new to this Watir, and having some difficulty figuring this out.

   I thought I would be starting something easy, by logging into Yahoo
   and then creating a new email. However I can not get the Xpath line to
   work.

   #Include the FireWatir file.

   require 'firewatir'

   #include the FireWatir Module.

   include FireWatir

   ff=Firefox.new

   #Open yahoo mail.

   ff.goto(http://mail. yahoo.com)

   #Put your user name.

   ff.text_field( :name,login ).set(username )

   #Put your password.

   ff.text_field( :name,passwd ).set(password )

   #Click Sign In button.

   ff.button(:value, Sign In).click

   # Locate the table cell element on the page.

   ff.cell(:xpath, //td[contains( text, 'New')]/).click

   #Click Sign Out button.

   #ff.link(:text, Sign Out).click

   #Close the browser.

   #ff.close

  _
  Rediscover Hotmail®: Get e-mail storage that grows with 
  you.http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Redisco...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: Yahoo mail, creating a new email message.

2009-04-09 Thread George

Hi there,

Using the IE Developer Toolbar, I'm finding that there is an attribute
associated with the New link called 'unselectable' which is set to
on.  This *may* mean that a script can't automatically select this
control.  Just a guess, though.

-George



On Apr 9, 11:05 am, cboudreau carlboudreau...@gmail.com wrote:
 Has anyone been able to create a new yahoo email in the new UI?

 Carl
--~--~-~--~~~---~--~~
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: Yahoo mail, creating a new email message.

2009-04-09 Thread orde

Take a look at http://wiki.openqa.org/display/WTR/XPath.

Based on the examples on that page, the following line:

@browser.cell(:xpath, //td[contains( text, 'New')]/).click

should be something like

@browser.cell(:xpath, //t...@id='compose_button_label']/../).click

Hope that helps.

orde


On Apr 9, 1:16 pm, Chuck van der Linden sqa...@gmail.com wrote:
 1) have you worked through the watir tutorial?  that might be a good
 place to start.

 2) have you looked at the object in question with something like
 firebug or IE developer toolbar to see if it's still part of a table,
 and not changed to perhaps just be in a div or perhaps a frame
 instead?  Maybe it's just a link now and much easier to get to?

 3) what is the error you are getting?  that will tell you (and us) a
 lot more about how it's failing.

 On Apr 9, 12:15 pm, cboudreau carlboudreau...@gmail.com wrote:

  Hi Al,

  your sample didn't work.

  I uncommented the  #ff.cell(:xpath, //td[contains( text,
  'New')]/).click

  I can log in with firewatir, but not get firewatir to click new to
  open the email editor in Yahoo.

  On Apr 9, 1:55 pm, Al Snow jas...@hotmail.com wrote:

   Carl,

   This works for me (after you put your login and password ;).

   require 'firewatir'
   include FireWatir

   ff=Firefox.new

   ff.goto(http://mail.yahoo.com;)
   ff.text_field( :name,login ).set(PUT LOGIN HERE )
   ff.text_field( :name,passwd ).set(PUT PASSWORD HERE )
   ff.button(:value, Sign In).click

   #ff.cell(:xpath, //td[contains( text, 'New')]/).click

   ff.link(:text, Sign Out).click
   ff.close

   Thanks,
   Al Snow
   Linkedin:http://www.linkedin.com/in/alsnow
   Google Talk: jasnow1
   Twitter: jasnow

Date: Thu, 9 Apr 2009 11:32:56 -0700
Subject: [wtr-general] Re: Yahoo mail, creating a new email message.
From: carlboudreau...@gmail.com
To: watir-general@googlegroups.com

I am new to this Watir, and having some difficulty figuring this out.

I thought I would be starting something easy, by logging into Yahoo
and then creating a new email. However I can not get the Xpath line to
work.

#Include the FireWatir file.

require 'firewatir'

#include the FireWatir Module.

include FireWatir

ff=Firefox.new

#Open yahoo mail.

ff.goto(http://mail. yahoo.com)

#Put your user name.

ff.text_field( :name,login ).set(username )

#Put your password.

ff.text_field( :name,passwd ).set(password )

#Click Sign In button.

ff.button(:value, Sign In).click

# Locate the table cell element on the page.

ff.cell(:xpath, //td[contains( text, 'New')]/).click

#Click Sign Out button.

#ff.link(:text, Sign Out).click

#Close the browser.

#ff.close

   _
   Rediscover Hotmail®: Get e-mail storage that grows with 
   you.http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Redisco...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] Super-special Guest Star on Watir Podcast

2009-04-09 Thread Tiffany Fodor

The next Watir Podcast will have an extra-special guest - Zeljko
Filipin himself!

I'm going to fill in as the host and I need lots of great questions
for Z*.  Please add any questions you have here.

-Tiffany
--~--~-~--~~~---~--~~
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: Yahoo mail, creating a new email message.

2009-04-09 Thread cboudreau

Well, I am sorry to report it is still failing.  However I sure do
appreciate the help with this.  I was tring to cut my teeth on this
before I start the real project of automating a PayPay functions.

But, I am just not getting it.  Maybe I will try my luck on the PayPal
project.  Has anyone automated the Capture button on PayPal?

As requested here is my yahoo mail training script;

require 'firewatir'
include FireWatir
ff=Firefox.new
ff.goto(http://mail.yahoo.com;)
ff.text_field( :name,login ).set(username )
ff.text_field( :name,passwd ).set(password )
ff.button(:value, Sign In).click
# id=global_compose_top
#ff.button(:value, New).click
# failing
#ff.cell(:xpath, //td[contains(text, 'New')]/).click
#failing
#ff.cell(:xpath, //td[contains(text, 'New')]/).click
#failing

ff.cell(:xpath, //t...@id='compose_button_label']/../).click

#ff.link(:text, Sign Out).click
#ff.close

Here is the error log from the last attempt;

ruby YahooMail_Test.rb
C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:967:in `assert_exists': Unable to locate
element, using :name,
login (Watir::Exception::UnknownObjectException)
from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
htmlelements.rb:1333:in `set'
from YahooMail_Test.rb:9
Exit code: 1

I was able to logged in, and the page loaded just fine but the New
button was never clicked.  So I don't know what to make of the error
message, it was logging me in.
Could it be that Watir, ended before the button click was registered
by Fire Fox ?


Carl
--~--~-~--~~~---~--~~
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] Test with the same GIVEN

2009-04-09 Thread keith shaw
I have recently started to use watircraft to organize my test cases.  I
really like the benefits watircraft provides when trying to manage and scale
a large number of test.  The problem I am having is I have two test each
with the same GIVEN in the feature.  This was never a problem in the past
because of the directory structure used in cucumber.  Now when I run all the
test at once using 'rake features' I get the following error :

lib/steps/binding_type_steps.rb:6:in `/^I am on the properties tab$/'
lib/steps/trim_size_steps.rb:6:in `/^I am on the properties tab$/'

from
/Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/step_mother.rb:91:in
`each'
from
/Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/step_mother.rb:91:in
`Given'
from ./lib/steps/trim_size_steps.rb:6
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
`polyglot_original_require'
from /Library/Ruby/Gems/1.8/gems/polyglot-0.2.5/lib/polyglot.rb:54:in
`require'
from
/Users/kshaw/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in
`require'
from
/Users/kshaw/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in
`new_constants_in'
from
/Users/kshaw/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in
`require'
from
/Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:76:in
`require_files'
from
/Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:74:in
`each'
from
/Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:74:in
`require_files'
from
/Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:34:in
`execute!'
from
/Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:20:in
`execute'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/cucumber:6
rake aborted!
Command failed with status (1):
[/System/Library/Frameworks/Ruby.framework/...]

Does anyone have any idea how I can solve this issue?

-Keith

--~--~-~--~~~---~--~~
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: Super-special Guest Star on Watir Podcast

2009-04-09 Thread Chuck van der Linden

sent you a few via the irc   let me know if you didn't get them for
some reason.

On Apr 9, 2:32 pm, Tiffany Fodor tcfo...@comcast.net wrote:
 The next Watir Podcast will have an extra-special guest - Zeljko
 Filipin himself!

 I'm going to fill in as the host and I need lots of great questions
 for Z*.  Please add any questions you have here.

 -Tiffany
--~--~-~--~~~---~--~~
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: Test with the same GIVEN

2009-04-09 Thread Chuck van der Linden

If the code inside the steps is not the same, and you can't figure out
a way to make it universal, then rename one or both of the steps (and
alter the features that call it)

  e.g. if the code is page specific, then maybe Given On the xxx page
I am on the properties tab or something of that sort.

If the code inside the steps is the same, remove one of them.  Part of
the idea of Cucumber is being able to re-use steps, so there's no need
to have the same step in two places.  Where you put the steps (in
terms fo what step file you use)  is up to you, you could for example
create a 'common_step file, or group by functionality.

You might want to read this:  
http://wiki.github.com/aslakhellesoy/cucumber/step-organisation
and also THIS as well:  
http://wiki.github.com/aslakhellesoy/cucumber/feature-coupled-steps-antipattern
which talks a little about what you want to avoid.

 Also be aware that the very latest edition of the framework (0.4.5 as
I write this) now allows you to install and use later versions of
cucumber, which means you get to use drum roll please :
http://wiki.github.com/aslakhellesoy/cucumber/scenario-outlines as
well as a host of other nifty features like pending steps, etc.

(and there was much rejoicing)

--Chuck

On Apr 9, 11:54 am, keith shaw keithsha...@gmail.com wrote:
 I have recently started to use watircraft to organize my test cases.  I
 really like the benefits watircraft provides when trying to manage and scale
 a large number of test.  The problem I am having is I have two test each
 with the same GIVEN in the feature.  This was never a problem in the past
 because of the directory structure used in cucumber.  Now when I run all the
 test at once using 'rake features' I get the following error :

 lib/steps/binding_type_steps.rb:6:in `/^I am on the properties tab$/'
 lib/steps/trim_size_steps.rb:6:in `/^I am on the properties tab$/'

     from
 /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/step_mother.­rb:91:in
 `each'
     from
 /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/step_mother.­rb:91:in
 `Given'
     from ./lib/steps/trim_size_steps.rb:6
     from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
 `gem_original_require'
     from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
 `polyglot_original_require'
     from /Library/Ruby/Gems/1.8/gems/polyglot-0.2.5/lib/polyglot.rb:54:in
 `require'
     from
 /Users/kshaw/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/active_support/depe­ndencies.rb:156:in
 `require'
     from
 /Users/kshaw/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/active_support/depe­ndencies.rb:521:in
 `new_constants_in'
     from
 /Users/kshaw/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/active_support/depe­ndencies.rb:156:in
 `require'
     from
 /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:­76:in
 `require_files'
     from
 /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:­74:in
 `each'
     from
 /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:­74:in
 `require_files'
     from
 /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:­34:in
 `execute!'
     from
 /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/../lib/cucumber/cli/main.rb:­20:in
 `execute'
     from /Library/Ruby/Gems/1.8/gems/cucumber-0.2.3/bin/cucumber:6
 rake aborted!
 Command failed with status (1):
 [/System/Library/Frameworks/Ruby.framework/...]

 Does anyone have any idea how I can solve this issue?

 -Keith
--~--~-~--~~~---~--~~
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: Yahoo mail, creating a new email message.

2009-04-09 Thread Chuck van der Linden

is the login page set to remember you? or is there a recent session or
cookie hanging around?  I don't think it's ACTUALLY logging you in, I
think the browser is just coming up that way.

did you try executing these steps one by one in an IRB session?

The error you are getting would indicate it had a problem identifying
something by the name of login.. that's far above the step where you
think it's failing.

Is there white space in your real script that's not shown below, the
error seems to come from line number 9 which is a comment in the
script below, and obviously cannot cause an error  whatever is
actually on line 9 in your script (I suspect the attempt to set the
login name) is what failed.

On Apr 9, 4:52 pm, cboudreau carlboudreau...@gmail.com wrote:
 Well, I am sorry to report it is still failing.  However I sure do
 appreciate the help with this.  I was tring to cut my teeth on this
 before I start the real project of automating a PayPay functions.

 But, I am just not getting it.  Maybe I will try my luck on the PayPal
 project.  Has anyone automated the Capture button on PayPal?

 As requested here is my yahoo mail training script;

 require 'firewatir'
 include FireWatir
 ff=Firefox.new
 ff.goto(http://mail.yahoo.com;)
 ff.text_field( :name,login ).set(username )
 ff.text_field( :name,passwd ).set(password )
 ff.button(:value, Sign In).click
 # id=global_compose_top
 #ff.button(:value, New).click
 # failing
 #ff.cell(:xpath, //td[contains(text, 'New')]/).click
 #failing
 #ff.cell(:xpath, //td[contains(text, 'New')]/).click
 #failing

 ff.cell(:xpath, //t...@id='compose_button_label']/../).click

 #ff.link(:text, Sign Out).click
 #ff.close

 Here is the error log from the last attempt;

 ruby YahooMail_Test.rb

 C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
 MozillaBaseElement.rb:967:in `assert_exists': Unable to locate
 element, using :name,
 login (Watir::Exception::UnknownObjectException)
         from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
 htmlelements.rb:1333:in `set'
         from YahooMail_Test.rb:9

 Exit code: 1

 I was able to logged in, and the page loaded just fine but the New
 button was never clicked.  So I don't know what to make of the error
 message, it was logging me in.
 Could it be that Watir, ended before the button click was registered
 by Fire Fox ?

 Carl
--~--~-~--~~~---~--~~
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] Live ONLINE Watir Training

2009-04-09 Thread Pete Dignan

Good news - the Intro to Watir class will be taught live online for
the first time April 27-28-29-30, 2009.  The class will run from 10am
to 1pm Central Daylight Time (US) those four consecutive days.  Same
content as our classroom training, covering Watir and the WatirCraft
framework.

Only SIX students will be accepted for this class to ensure a high-
quality learning experience.

For more information about the class, visit 
http://www.watircraft.com/watir-training/.

To register, go to http://aprilonlinewatirtraining.eventbrite.com.

Watir-General list subscribers can enter the discount code goldfish
to receive a discount of $400 off list price - only $795 after
discount.

This class is likely to fill up quickly, and we can't promise a
discount on future sessions, so sign up now.

Pete
--~--~-~--~~~---~--~~
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] How to Input Content to FCK textarea

2009-04-09 Thread LichengCai

I am a new user of watir,When I write testcases For a CMS system.
I have read 
http://groups.google.com/group/watir-general/browse_thread/thread/5852900e02fea4fa,
So I wrote code like this:

ie.frame(ifrmContent).frame(:index, 3).frame(:id,
WebEditorTextarea___Frame).frame(:id,
xEditingAreaFrame).document.body.focus;
puts FCKEditor Passes
ie.send_keys(Life is Good)

but it is reponse is:
FCKEditor Passes
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie.rb:113:in
`initialize':
unknown OLE server: `AutoItX3.Control' (WIN32OLERuntimeError)
HRESULT error code:0x800401f3
  无效的类别字符串  from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/
watir/ie.rb:113:in `new'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
ie.rb:113:in `autoit'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-
class.rb:427:in `autoit'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-
class.rb:435:in `send_keys'
from login_test.rb:27

Why? I don`t understand. Someone said the watir can`t deal with iframe
very well, It`s true?

--~--~-~--~~~---~--~~
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: Yahoo mail, creating a new email message.

2009-04-09 Thread cboudreau

Thanks for your presistance on this,

Line 11 is the login line,

I have set Firefox to clear all personal data when exiting, and now I
am seeing acurate error message related to the actual error lines.

The next set of error messages is where I started with line 17
uncommented our, then I start over with line 19 uncommentedm then line
22 and so on

Here is the Watir code
17 #ff.button(:value, New).click
18 # failing
19 #ff.cell(:xpath, //t...@contains(text, 'New')]/).click
20 #failing
21 #ff.cell(:xpath, //td[contains(text, 'New')]/).click
22 #failing
23 #ff.cell(:xpath, //t...@id='compose_button_label']/../).click
24 #failing
25 #ff.cell(:xpath, //td[id='compose_button_label']/../).click
26 #failing
27 #ff.cell(:xpath, //td[contains(text(), 'New')]/).click

Here is the error log;
ruby LoginYahoo.rb
C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:967:in `assert_exists': Unable to locate
element, using :value,
New (Watir::Exception::UnknownObjectException)
from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:1112:in `click'
from LoginYahoo.rb:17
Exit code: 1
ruby LoginYahoo.rb
C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:967:in `assert_exists': Unable to locate
element, using :xpath, //t...@contains(text,
'New')]/ (Watir::Exception::UnknownObjectException)
from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:1112:in `click'
from LoginYahoo.rb:19
Exit code: 1
ruby LoginYahoo.rb
C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:967:in `assert_exists': Unable to locate
element, using :xpath, //td[contains(text,
'New')]/ (Watir::Exception::UnknownObjectException)
from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:1112:in `click'
from LoginYahoo.rb:21
Exit code: 1
ruby LoginYahoo.rb
C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:967:in `assert_exists': Unable to locate
element, using :xpath, //td
[...@id='compose_button_label']/../ (Watir::Exception::UnknownObjectException)
from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:1112:in `click'
from LoginYahoo.rb:23
Exit code: 1
ruby LoginYahoo.rb
C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:967:in `assert_exists': Unable to locate
element, using :xpath, //td
[id='compose_button_label']/../ (Watir::Exception::UnknownObjectException)
from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:1112:in `click'
from LoginYahoo.rb:25
Exit code: 1
ruby LoginYahoo.rb
C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:967:in `assert_exists': Unable to locate
element, using :xpath, //td[contains(text(),
'New')]/ (Watir::Exception::UnknownObjectException)
from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
MozillaBaseElement.rb:1112:in `click'
from LoginYahoo.rb:27
Exit code: 1

Using Firebug here is the inspected code;
div id=coreToolbar class=axsToolbar style=height: auto;
bbwidth=161
 table id=btnTbl_launch:send_and_receive_all class=buttonTable
axsButton cellpadding=0 title=Check for new mail (m)
boid=undefined_launch:send_and_receive_all
cmd=launch:send_and_receive_all state=normal style=
onmouseover=Uo.Z(event, this) unselectable=on
 tbody
 tr
 td class=leftCap style=width: 3px; unselectable=on
div style=width: 3px; visibility: hidden;/
/td
 td class=buttonIconCell unselectable=on
div class=button style=background-position: -1700px 0px;
unselectable=on/
/td
td id=check_mail_button_label class=labelCell nowrap=
unselectable=onCheck Mail/td
 td class=rightCap style=width: 3px; unselectable=on
div style=width: 3px; visibility: hidden;/
/td
/tr
/tbody
/table
 table id=btnTbl_compose:new_message class=comboButton axsButton
axsOwns_compose_menu axsHasPopup cellpadding=0 title=Write a new
mail message (n) boid=undefined_compose:new_message
cmd=compose:new_message state=normal style= onmouseover=Uo.Z
(event, this) unselectable=on
 tbody
 tr
 td class=leftCap style=width: 3px; unselectable=on
div style=width: 3px; visibility: hidden;/
/td
 td class=buttonIconCell unselectable=on
div class=button style=background-position: -1730px 0px;
unselectable=on/
/td
td id=compose_button_label class=labelCell nowrap=
unselectable=onNew/td
 td class=dropDownLeftCap unselectable=on
div style=width: 2px; visibility: hidden;/
/td
 td class=dropDownIconCell unselectable=on
div id=compose_button_combo class=comboArrow unselectable=on/
/td
 td class=rightCap style=width: 3px; unselectable=on
div style=width: 3px; visibility: hidden;/
/td
/tr
/tbody
/table
/div

I am using SciTE, I saw that someone said their script worked in the
cmd window, but not is SciTE.  I can try that if you think it might