[wtr-general] Re: How to locate the element with node(child node, father node) or directory attributes?

2008-10-07 Thread wesley chen
Thanks Bret, your comment works.
I mistake the parent as parentNode, so I always failed.

Hi, Aidy,
Would you please show your idea more detailed?
I think your idea may be useful sometimes.


Thanks all you guys.

Wesley.
--:)
Man should be hard to himself, but tolerant to others.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: background testing

2008-10-14 Thread wesley chen
$HIDE_IE=true
--:)
Man should be hard to himself, but tolerant to others.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to capture data from a web page in Watir?

2008-10-15 Thread wesley chen
I think the html code you provided is too little and not reasonable.
If you want to capture so little data on this page, you can use regular
expression.


Wesley
Man should be hard to himself, but tolerant to others.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to call ruby script from another ruby script

2008-10-15 Thread wesley chen
1. Create rb file 1: test1.rb
class Test1
def get_s(str)
puts str
end
end
test1=Test1.new
test1.get_s(test1 rb)

2. Create rb file 2: test2.rb
require 'watir'
class Test2
def test2(str)
puts str
end
end
test2=Test2.new
test2.test2(In test2)

3. Create rb file 3: test3.rb
require 'watir'
path1= File.dirname(__FILE__)+'/test1.rb'
path2= File.dirname(__FILE__)+'/test2.rb'
system(ruby #{path1})
system(ruby #{path2})

Attention: test1.rb, test2.rb and test3.rb should be in the same directory.
In test3.rb, you just need to assign the right file directory, you can use
system(ruby #{path}) to run the script you want.

Expect it could help.

Wesley
Man should be hard to himself, but tolerant to others.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: background testing

2008-10-15 Thread wesley chen
Sound great, I will have a try of virtualbox.
Hi, Paul,
which VM is the best in your opinion?

Thanks.
Wesley
Man should be hard to himself, but tolerant to others.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to locate the element with node(child node, father node) or directory attributes?

2008-10-17 Thread wesley chen
Hi, Bret,
When we use parent, we can go to one level parent node, but if I would like
to go to the root node directly, how to make it?

Thanks.

Wesley
Man should be hard to himself, but tolerant to others.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to upload a file in Chinese operation system?

2008-10-27 Thread wesley chen
Hi, Apple,
Thanks very much, I will try your comment later in my machine.
In Chinese operation system, we can only upload the attachment by the method
of autoit?

Thanks.
Wesley
Man should be hard to himself, but tolerant to others.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to upload a file in Chinese operation system?

2008-10-28 Thread wesley chen
Hi, Wiston,
Your script won't work, it just open the choose file dialog and then hang.

Would you please retest the script again?

Thanks.

Wesley
Man should be hard to himself, but tolerant to others.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Watir does not work with Orkut JS hacks

2008-10-29 Thread wesley chen
You just need use focus, such as:
ie.frame(:id, //).document.body.focus
ie.send_keys(...)


Wesley
Man should be hard to himself, but tolerant to others.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How can I get the text in the frame text field?

2008-11-02 Thread wesley chen
Hi, Tony,
I get the checkbox unchecked in Tool | Internet options, and I turn to my
site, it works.


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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] wait_until doesn't work.

2008-11-10 Thread wesley chen
I have installed watir1.6 few months ago, then I installed watir1.6.1,
recently I installed watir 1.6.2, and I upgraded my rubygem (I have not
uninstall anything), today, I found when I only require 'watir'  and don't
include Watir, i use wait_until, it said, wait_until has not defined. Then,
I require 'watir' and include Watir, use watir_until, it said that, no such
file to load: safariwatir

What's the problem? Do I have to uninstall the watir and rubygem and then
install again?


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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Microsoft Sharepoint Watir

2008-11-10 Thread wesley chen
Hi, Keith,
In fact, somebody has met the problem as you referred, please go to
http://groups.google.com/group/watir-general/browse_thread/thread/59fac3f95c6bb799/ec4b133621759c8c?lnk=gstq=fire_event#ec4b133621759c8c

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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to get the system date to my text field.

2008-11-11 Thread wesley chen
Yes, require 'time' is not required in Watir.

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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Locating elements in a lightViewIFrame class?

2008-11-13 Thread wesley chen
It works for click the close div in the Pop up dialog, I think you can also
click something other elements if you rewrite the Li method.

ie.image(:src,/yellow_thumb/).click
ie.div(:class, lv_Button lv_Close).click


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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] It displays error message when I use method bring_to_front.

2008-11-13 Thread wesley chen
My Code is as below:
require 'watir'
ie=Watir::IE.attach(:title, /Please/)
ie.bring_to_front
puts OK, bring the window to font

But today, I get the error message as below:
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie.rb:113:in
`initialize': failed to create WIN32OLE object from `AutoItX3.Control'
(WIN32OLERuntimeError)

HRESULT error code:0x8007007e

I am sure the code can work in few days ago, Have I made something wrong? I
just uninstall watir 1.5, watir 1.6.1 and keep watir 1.6.2 in my system.

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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Text field Numeric Issue

2008-11-18 Thread wesley chen
Sorry, I have made a mistake, ignore what I said.

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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: following object is not identified in watir

2008-11-19 Thread wesley chen
Try the code below:

def upload_file(ie, filepath)
if filepath.include?(/)
filepath.gsub!(/,\\)
end
   if FileTest.exists?(filepath)
   ie.file_field(:id,theFile[0]).set(filepath)
  else
   return false
  end
end

upload_file($ie, c:\\123.txt)


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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Unable to enter message in Hotmail!

2008-11-20 Thread wesley chen
Hi, Margam,
Please try code below:
ie.div(:id, RichTextEditor_surface).focus
ie.send_keys(hello)


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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Frame access

2008-11-30 Thread wesley chen
Try ie.frame(:id,...).frame(:id, ...).table(:index,...).click
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Security Information pop-up turns up two times, how to deal with the input between the two pop-up turning up?

2008-12-02 Thread wesley chen
I tried both your suggestion, but it doesn't work.

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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: How to click the ► on the page?

2008-12-02 Thread wesley chen
Thanks to all of you.
In fact, the issue is not so hard.
I can't cope with the problem just because, I didn't tell from the 'cell'
and 'table', I misunderstood that, the 'cell' can be replaced by 'table' all
the time.

Both the two method below can work:
ie.cell(:id,/td0/).click
ie.element_by_xpath(//td[contains(@onclick,'workoutNum')]/).click

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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Dealing with Java script pop up -- Please help

2008-12-04 Thread wesley chen
I am sure if you search detailed in the group, you can get the solution.
Below is one way to deal with the problem.
require 'watir'
def popup_clicker(ie,buttonname)
require 'watir/contrib/enabled_popup'
require 'win32ole'
hwnd = ie.enabled_popup(5)
if(hwnd)  #yeah! a popup
popup = WinClicker.new
popup.makeWindowActive(hwnd) #Activate the window.
popup.clickWindowsButton_hwnd(hwnd,buttonname) #Click the button
#popup.clickWindowsButton(/Internet/,buttonname,30)
popup=nil
end
end
ie=Watir::IE.attach(:title,/javascript/)
ie.link(:text,/click/i).click_no_wait
popup_clicker(ie,OK)

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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Methods

2008-12-04 Thread wesley chen
require 'watir'
require 'rubygems'
require 'watir/testcase'  # First, you have to require 'watir/testcase'
class Test1 Watir::TestCase # Second, you have to  Watir::TestCase
   def test_a   # Third, you have to define the method name as
'test_', start with 'test_'
   end
end

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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: do not know how to give input to a text box, which does not have a standard class or property in its HTML

2008-12-11 Thread wesley chen
:), Welcome.

Thanks.
Wesley Chen.


On Thu, Dec 11, 2008 at 5:04 PM, Vijay [EMAIL PROTECTED] wrote:


 Wesley,

 Thank you so much for your reply.  Your code worked like a gem and
 solved the problem.

 Thanks,
 Vijay.

 On Dec 11, 11:50 am, wesley chen [EMAIL PROTECTED] wrote:
  Try the comment below:
  ie.frame(:id,//).document.body.focus
  ie.send_keys(hello)
 
  Thanks.
  Wesley Chen.
 
 
 
  On Thu, Dec 11, 2008 at 10:32 AM, Vijay [EMAIL PROTECTED]
 wrote:
   Developer toolbar', it focuses on the BODY tag in the below 'html-
 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: persistant 'about:blank' window on Vista.

2008-12-28 Thread wesley chen
Thanks.
Wesley Chen.


On Sat, Dec 27, 2008 at 10:40 PM, aidy lewis aidy.le...@googlemail.comwrote:


 Hi,

 I am not currently at home, so I am on a Vista machine.

 Has anyone seen a persistant 'about:blank' ie window on Vista?

 require 'watir'
 Watir::Browser.default = ie
 browser = Watir::Browser.new
 browser.goto(www.gmail.com)

 (left with two ie windows: about:blank and gmail)

 Aidy

 


--~--~-~--~~~---~--~~
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: persistant 'about:blank' window on Vista.

2008-12-28 Thread wesley chen
ie=Watir::IE.attach(:title,//)
ie.goto(www.gmail.com)
Thanks.
Wesley Chen.


On Mon, Dec 29, 2008 at 9:52 AM, wesley chen cjq@gmail.com wrote:


 Thanks.
 Wesley Chen.



 On Sat, Dec 27, 2008 at 10:40 PM, aidy lewis aidy.le...@googlemail.comwrote:


 Hi,

 I am not currently at home, so I am on a Vista machine.

 Has anyone seen a persistant 'about:blank' ie window on Vista?

 require 'watir'
 Watir::Browser.default = ie
 browser = Watir::Browser.new
 browser.goto(www.gmail.com)

 (left with two ie windows: about:blank and gmail)

 Aidy

 



--~--~-~--~~~---~--~~
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: row_count incorrect value returned

2009-01-06 Thread wesley chen
Would you please provide us with the source code?


Thanks.
Wesley Chen.


On Sat, Jan 3, 2009 at 7:32 AM, dmitry...@gmail.com dmitry...@gmail.comwrote:


 Also I should mention that this table is dynamic, so a user can upload
 and delete images etc. from it on the front end.

 On Jan 2, 5:44 pm, dmitry...@gmail.com dmitry...@gmail.com wrote:
  Hello everyone,
  I'm running into a little problem
  when i do
  browser.table(:id, /TableName/).row_count
 
  It only returns one row, which is probably the header row but does not
  count the other rows in the table.
  When I view Source it only shows me the header TR but omits the
  other 4 that I see in the developers toolbar. What could be my issue?
  Thank you.
 


--~--~-~--~~~---~--~~
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: Multiple Attributes Issue

2009-01-08 Thread wesley chen
I think text_field doesn't support multiple attributes in this release.
Thanks.
Wesley Chen.


On Fri, Jan 9, 2009 at 3:32 AM, Moochie dduph...@redbrickhealth.com wrote:



 $ie.text_field(:id='diagnosis_date',:index=index)

 Creates a error

 send:{index=2, :id+diagnosis_date} is not a symbol.

 I looked and there is a defect, but Im not sure if it's been fixed


 http://wiki.openqa.org/display/WTR/Multiple+Attributes



 


--~--~-~--~~~---~--~~
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: Cannot access New Browser window generated through Javascript code executed on Click of a Button.

2009-01-09 Thread wesley chen
The code below can help you locate on the new window.
def new_window
# get a handle if one exists
aa = Win32API.new(user32, GetForegroundWindow,[] , 'L')
hwnd = aa.call
if (hwnd)  # yes there is a popup
return Watir::IE.attach(:hwnd, hwnd)
else
return nil
end
end

if (ie2=new_window)
ie2.button( ).click
end

Thanks.
Wesley Chen.


On Fri, Jan 9, 2009 at 2:42 PM, asheesh misra asheeshmisr...@gmail.comwrote:

 ipt code opens a new browser window (withou

--~--~-~--~~~---~--~~
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: About Javascript Popups/Dialogue Box

2009-01-09 Thread wesley chen
About the dialog-pop up, the code from Watir.com is easy and well enough to
deal with most of the issues.
In our project, if we can avoid the popup by our extra code, we'd better
avoid it, watir code is not steady enough to deal with it.
Watir::Waiter.wait_until is not good enough to deal with the wait pop-up
issue. In our project, for pop-up issue, it is good to use *sleep*, for
other web elements waiting, Watir::Waiter.wait_until is quite useful.

The method below can deal with most of the dialog popup.
#For OK, Cancle button or OK button
def popup_clicker(ie,buttonname)
require 'watir/contrib/enabled_popup'
require 'win32ole'
hwnd = ie.enabled_popup(5)
if(hwnd)  #yeah! a popup
popup = WinClicker.new
popup.makeWindowActive(hwnd) #Activate the window.
popup.clickWindowsButton_hwnd(hwnd,buttonname) #Click the button
#popup.clickWindowsButton(/Internet/,buttonname,30)
popup=nil
end
end
# For input box
def prompt_popup(ie,waitTime,user_input,button)
require 'watir/contrib/enabled_popup'
require 'win32ole'
# get a handle if one exists
hwnd = ie.enabled_popup(waitTime)
if(hwnd)  # yes there is a popup
w = WinClicker.new
if(user_input)
w.setTextValueForFileNameField(hwnd,user_input)
end
w.clickWindowsButton_hwnd(hwnd, #{button})
w=nil
end
end

Expect the code above can help some of you guys.
Thanks.
Wesley Chen.


On Fri, Jan 9, 2009 at 2:44 PM, Wilson Xu xu.xiaodong.wil...@gmail.comwrote:

 Hi guy,whether it can work or not?


 On Fri, Jan 9, 2009 at 2:36 PM, aami...@gmail.com wrote:


 Hi Wilson,
 I am using latest Ruby 1.8.6-27 with the watir 1.6

 On Jan 9, 11:07 am, Wilson Xu xu.xiaodong.wil...@gmail.com wrote:
  Which watir version do you use?
 
  On Fri, Jan 9, 2009 at 1:29 PM, aami...@gmail.com wrote:
 
   Hi Wilson,
   Thanks for the reply. I executed the modified script, but dint work
   out. I got the following Error:
 
   ruby popup.rb
   C:/Ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/waiter.rb:
   59:in `wait_until': Timed out after 9.5 seconds.
   (Watir::Exception::TimeOutException)
  from
 C:/Ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/
   waiter.rb:80:in `wait_until'
  from
 C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/contrib/
   enabled_popup.rb:10:in `enabled_popup'
   from popup.rb:8:in `startClicker'
  from popup.rb:27
   Exit code: 1
 
   Do I need to make any changes in the enabled_popup.rb file?
 
   On Jan 9, 6:40 am, Wilson Xu xu.xiaodong.wil...@gmail.com wrote:
you are wrong, Watir can handle javascript pop up box, I have
 modified
   your
script, please copy my code to try it. Ha, it works very well.
require 'watir'
require 'watir/contrib/enabled_popup'
 
def startClicker( button , waitTime= 9, user_input=nil )
  # get a handle if one exists
  hwnd = $ie.enabled_popup(waitTime)
  if (hwnd)  # yes there is a popup
w = WinClicker.new
if ( user_input )
  w.setTextValueForFileNameField( hwnd, #{user_input} )
end
# I put this in to see the text being input it is not necessary
 to
   work
sleep 3
# OK or whatever the name on the button is
w.clickWindowsButton_hwnd( hwnd, #{button} )
#
# this is just cleanup
w=nil
  end
end
 
$ie = Watir::IE.new
$ie.goto('C:/test.html/')
$ie.link(:text, 'Click Here').click_no_wait
startClicker(OK)
 
Wilson Xu
 
On Thu, Jan 8, 2009 at 6:14 PM, aami...@gmail.com wrote:
 
 Hi Jagdeep,
 I am facing the same problem of handling javascript popups.
 Inspite of
 repeated posts, dint find any concrete solution. It seems this is
 a
 limitation with the Watir tool. Pathetic :(
 
 On Jan 2, 7:26 pm, Jagdeep Jain jagdeep.j...@gmail.com wrote:
  Hi,
  I have the following code but the problem here is that I am not
 able
  to move forward to next page which appear after clicking on OK
  button of Java Script pop up.
  HTML is as follows:
  I save this file in C: drive as test.html
 
  html head script type=text/javascript function
 disp_alert()
  { alert(I am an alert box!!); } /script title Jagdeep
 /title
   /
  head
  body a href= http://www.google.com; onclick=disp_alert()
 /
  Click Here /a  /body
  /html
 
  Watir Script is as follows:
 
  require 'watir'
  require 'watir/ie'
  require 'watir/contrib/enabled_popup'
  #require 'win32ole'
 
  def startClicker( button , waitTime = 10)
w = WinClicker.new
longName = $ie.dir.gsub(/ , \\ )
shortName = w.getShortFileName(longName)
c = start rubyw #{shortName
 }\\watir\\clickJSDialog.rb#{button} #
  {waitTime}
puts Starting #{c

[wtr-general] Re: Cannot access New Browser window generated through Javascript code executed on Click of a Button.

2009-01-09 Thread wesley chen
You said:
The HTML code for the button does not have any href or any other information
that can be used for the pupose of grabbing the new browser window.

May we have a try? I think anything can be grab.

if(ie2=new_window)
ie2
end

In fact, ie2 is the new window, then you can practice in the ie2

Thanks.
Wesley Chen.


On Fri, Jan 9, 2009 at 10:15 PM, wesley chen cjq@gmail.com wrote:

 Would you please provide all your code? I think your code is not good
 enough.
 And I don't know what you ask me in this issue.

 Expect I can help you.

 end


 Thanks.
 Wesley Chen.



 On Fri, Jan 9, 2009 at 6:27 PM, asheesh misra asheeshmisr...@gmail.comwrote:

 Hi Wesley,

 Very many thanks for the prompt reply.

 However, on adding the same code, following error is displayed:
 c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1202:in `attach_browser_window':
 ArgumentError (ArgumentError)
 from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1186:in `each'
 from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1186:in
 `attach_browser_window'
 from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb::in `attach_init'
 from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1104:in `attach'
 from fileopen.rb:10:in `new_window'

 I have used 'attach' method with two options only: title and url. I do not
 have any idea of using ':hwnd.

 I eagerly await your response. Helping People like you are a boon to
 newbies like me.

 Thanks,

 Asheesh



 On Fri, Jan 9, 2009 at 2:02 PM, wesley chen cjq@gmail.com wrote:

 The code below can help you locate on the new window.
 def new_window
 # get a handle if one exists
 aa = Win32API.new(user32, GetForegroundWindow,[] , 'L')
 hwnd = aa.call
 if (hwnd)  # yes there is a popup
 return Watir::IE.attach(:hwnd, hwnd)
 else
 return nil
 end
 end

 if (ie2=new_window)
 ie2.button( ).click
 end

 Thanks.
 Wesley Chen.


 On Fri, Jan 9, 2009 at 2:42 PM, asheesh misra 
 asheeshmisr...@gmail.comwrote:

 ipt code opens a new browser window (withou






 



--~--~-~--~~~---~--~~
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: Full Screen [F11] FireFox

2009-01-11 Thread wesley chen
$ie.maximizeor
$firefox.maximize

Thanks.
Wesley Chen.


On Mon, Jan 12, 2009 at 12:22 AM, Dhanalaxmi dhanalax...@gmail.com wrote:


 Hi All

  Using following
 ie.getIE.parent.FullScreen = true

 internet explorer window can be made full screen.
 How should i achieve the same for firefox?


 


--~--~-~--~~~---~--~~
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 deal with two security information pop-up with Watir script?

2009-01-12 Thread wesley chen
Excellent! When I follow your advise and change the setting, both the two
security pop ups are avoided, :),

Really appreciate to you.

Thanks.
Wesley Chen.


On Tue, Jan 13, 2009 at 1:52 AM, Michael Hwee michael_h...@yahoo.comwrote:

 Wesley,
 Just set the configuration to get rid of it.

 Goto: Internet Options  Security Settings  Miscellaneous  Display mixed
 content == 'Enable'

 Michael

 --
 *From:* wesley chen cjq@gmail.com
 *To:* Watir General watir-general@googlegroups.com
 *Sent:* Sunday, January 11, 2009 10:24:25 PM
 *Subject:* [wtr-general] How to deal with two security information pop-up
 with Watir script?

 Hi, All,
 Would anyone of you ve interested in the Security Pop up?
 I think you can deal with all the Security Pop up issues if you can solve
 the question below.
 Expect you could help.

 Please use IE browser.
 1. Please goto URL: http://training.active.com/ActiveTrainer/
 There will be with Security Information pop up
 We have to achieve clicking Yes
 2. Please input account information:
 tes...@live.com
 11
 There will be with another Security information pop up before you login the
 system
 We have to achieve clicking Yes again.

 How to achieve the whole process with Watir Script?
 Open a browser -- Input the URL -- click Yes on Security Pop up ---
 Input account information --- click Yes again on the Security Pop up.

 Appreciated to your help.
 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: Access an object

2009-01-13 Thread wesley chen
We can't use set, exists? and many other methods after comment
:element_by_xpath

Thanks.
Wesley Chen.


On Wed, Jan 14, 2009 at 12:46 AM, TCBlues tcbl...@gmail.com wrote:


 Thanks for your answer.

 In the case the object is a textField or a listField I'm trying to set
 the control with:
 ie.element_by_xpath(//*...@name=imp1]).set(testing)

 but an error comes up: 13:in `method_missing': unknown property or
 method `set' (WIN32OLERuntimeError)


 


--~--~-~--~~~---~--~~
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: Access an object

2009-01-14 Thread wesley chen
Thanks very much. I study from you again, :)
Thanks.
Wesley Chen.


On Wed, Jan 14, 2009 at 11:59 AM, Richard Lawrence rslawre...@gmail.comwrote:


 You don't get back the specific object type from element_by_xpath, so
 some methods don't work. But this works:

 b = Watir::IE.new
 b.goto 'http://www.google.com/'
 txt = b.element_by_xpath(//*...@name='q'])
 txt.value = 'Richard Lawrence'
 btn = b.element_by_xpath(//*...@name='btnG'])
 btn.click

 So you might try the value property instead of the set method.

 Richard

 On Tue, Jan 13, 2009 at 9:46 AM, TCBlues tcbl...@gmail.com wrote:
 
  Thanks for your answer.
 
  In the case the object is a textField or a listField I'm trying to set
  the control with:
  ie.element_by_xpath(//*...@name=imp1]).set(testing)
 
  but an error comes up: 13:in `method_missing': unknown property or
  method `set' (WIN32OLERuntimeError)
 

 


--~--~-~--~~~---~--~~
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: Code hangs after a div click

2009-01-15 Thread wesley chen
What's the detail information about your div? When the div is clicked, what
will happen?

Thanks.
Wesley Chen.


On Fri, Jan 16, 2009 at 9:14 AM, Michael Hwee michael_h...@yahoo.comwrote:



 Try click_no_wait()



 - Original Message 
 From: zeng0...@gmail.com zeng0...@gmail.com
 To: Watir General watir-general@googlegroups.com
 Sent: Thursday, January 15, 2009 11:20:10 AM
 Subject: [wtr-general] Code hangs after a div click


 I have the following code:

$browser.link(:text, Media).click
$browser.link(:text, Content Manager).click
Watir::Waiter.wait_until { $browser.text.include? tag all items }
   $browser.div(:class, collection-container-scroller).table
 (:index, 1)[1][1].div(:class,collection-entry-title-thumb-
 compact).click
puts(after click the collection)

 It did click the div, but seems after the click, the code hangs and
 the next line never gets executed. I also tried irb, it's the same,
 after click the div, the irb command line never comes back, I have to
 use Ctrl-C to stop it. Does anyone have idea about this?

 Thanks in advance!


 


--~--~-~--~~~---~--~~
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: Clicking a JavaScript image button

2009-01-15 Thread wesley chen
I don't know what will happen when the image button is triggered.

Maybe it will succeed to separate the Javascript.
such as:
require 'watir'
ie=Watir::IE.start(your address)
ie.image(:id,/btnLogin_imgButton/).fire_event(onmouseup) # or
***.fire_event(onmousedown) or...
ie.image(:id,/btnLogin_imgButton/).click

Thanks.
Wesley Chen.


On Fri, Jan 16, 2009 at 3:29 AM, Oded adlersb...@gmail.com wrote:


 I've tried this previously to posting the thread,
 this gives the same result as the thing I posted, resulting in no
 error nor action.

 On Jan 15, 5:00 pm, wesley chen cjq@gmail.com wrote:
  require 'watir'
  ie=Watir::IE.start(your address)
  ie.image(:id,/btnLogin_imgButton/).click
 
  Thanks.
  Wesley Chen.
 
  On Thu, Jan 15, 2009 at 8:04 PM, Oded adlersb...@gmail.com wrote:
 
   Hello all,
   I'm fairly new to Watir, I'm trying to click on a certain image button
   with no success.
   My code looks like this:
   require watir
   ie = Watir::new
   ie.goto(host)
   ie.image(:id, 'btnLogin_imgButton').fire_event(OnMouseDown)
   ie.image(:id, 'btnLogin_imgButton').fire_event(OnMouseUp)
   ie.image(:id, 'btnLogin_imgButton').fire_event(OnMouseLeave)
   ---
   The above script gives no error, judging by the Ruby output it runs
   and performs its task but the button remains untouched.
   I've also tried using a simple .click cmd with no success.
   I can see from the source code that there's an event with a checkbox
   etc, but I could not figure out a way to work around it.
 
   The relevant source code for the page:
   img id=btnLogin_imgButton style=cursor:hand;
   onmouseup=btnLogin_OnMouseUp(); onmousedown=btnLogin_OnMouseDown
   (); onmouseover=btnLogin_OnMouseOver();
   onmouseleave=btnLogin_OnMouseLeave(); /
   span style=display:none;input id=btnLogin_IsEnable
   type=checkbox name=btnLogin$IsEnable checked=checked //span
   script type=text/javascript
  var IsEnable = document.getElementById( 'btnLogin_IsEnable' );
  function btnLogin_OnMouseOver()
  {
  if(document.getElementById(
 'btnLogin_IsEnable').checked)
  event.srcElement.src='Images/New/buttons/login/
   btn_login_over.png';
  else
  event.srcElement.src='Images/New/buttons/login/
   btn_login_disabled.png';
  }
  function btnLogin_OnMouseLeave()
  {
  if(document.getElementById(
 'btnLogin_IsEnable').checked)
 
event.srcElement.src='Images/New/buttons/login/btn_login.png';
  else
  event.srcElement.src='Images/New/buttons/login/
   btn_login_disabled.png';
  }
  function btnLogin_OnMouseDown()
  {
  if (event.button == 1)
  {
  if(document.getElementById(
   'btnLogin_IsEnable').checked)
 
event.srcElement.src='Images/New/buttons/login/
   btn_login_click.png';
  else
 
event.srcElement.src='Images/New/buttons/login/
   btn_login_disabled.png';
  }
  }
  function btnLogin_OnMouseUp()
  {
  if (event.button == 1)
  {
  if(document.getElementById(
   'btnLogin_IsEnable').checked)
  {
 
event.srcElement.src='Images/New/buttons/login/btn_login.png';
  Login();
  }
  else
 
event.srcElement.src='Images/New/buttons/login/
   btn_login_disabled.png';
  }
  }
 
  function btnLogin_None () {}
 
  var btnLogin = new function() { var img = document.getElementById
   ('btnLogin_imgButton'); this.ActiveImage = 'Images/New/buttons/login/
   btn_login.png';
   this.SelectedImage = 'Images/New/buttons/login/btn_login_click.png';
   this.OverImage = 'Images/New/buttons/login/btn_login_over.png';
   this.DisabledImage = 'Images/New/buttons/login/
   btn_login_disabled.png';
   this.Hide = function() { img.style.display='none'; };
   this.Show = function() { img.style.display='inline'; };
   this.Disable = function() { img.src=this.DisabledImage;
   document.getElementById('btnLogin_IsEnable').checked=false;};
   this.Enable = function() { img.src=this.ActiveImage;
   document.getElementById('btnLogin_IsEnable').checked=true;};
   };
   document.getElementById('btnLogin_imgButton').src =
   document.getElementById('btnLogin_IsEnable').checked? 'Images/New/
   buttons/login/btn_login.png':'Images/New/buttons/login/
   btn_login_disabled.png';
 
   /script
   
 
   Any kind of help would be appreciated, 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

[wtr-general] Re: clicking on link with with raquo

2009-01-16 Thread wesley chen
You can try two ways:
First:
browser.link(:text, /Skip for now/).click
Second:
Replace

with
amp;
On Sat, Jan 17, 2009 at 3:32 AM, Jeremy Owens jer...@weplay.com wrote:


 I am trying to click on a link which looks like the following:

 a href=/dashboardSkip for now »/a

 I tried:  browser.link(:text, Skip for now ).click
 which did not work. I believe the character is actually raquo.

 Solutions?

 Thanks,
 Jeremy

 



-- 
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: using a table cell variable

2009-01-16 Thread wesley chen
Try :
row = checkbox_id.match(/\d\d/).to_i

On Sat, Jan 17, 2009 at 1:43 AM, aidy lewis aidy.le...@googlemail.comwrote:


 Hi,

 Has anyone had problems using a variable in the cell array?

checkbox_id =
 ingest.find_enabled_checkbox(Search_ItemDetail_SpoolGrid).id
row = checkbox_id.match(/\d\d/)
browser.table(:id, /Search_ItemDetail_SpoolGrid/)[row][3].text

 This is the stack trace

  undefined method `-' for #MatchData:0x6012f10 (NoMethodError)
  c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/table.rb:159:in
 `_row'
  c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/table.rb:99:in `[]'


 This will work the though

  browser.table(:id, /Search_ItemDetail_SpoolGrid/)[15][3].text

 Aidy

 



-- 
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: Issue with using arguments within Open Office (column, row) code

2009-01-19 Thread wesley chen
Why don't you put your solution here and let more people learn from you?
Why do you let others consult to you privately?

Thanks.
Wesley Chen.


On Tue, Jan 20, 2009 at 2:26 AM, dmitry...@gmail.com dmitry...@gmail.comwrote:


 Thanks guys for the comments guys, I already got it to work. Turned
 out a bit more complex but it works :) If anyone runs into this issue
 let me know, I'll try and guide ou through the steps I took.



 On Jan 19, 12:35 pm, bwaybandit lenridge...@gmail.com wrote:
  arity is a computer science term for arguments to a function.
 
  FirstTest.new.test (1, 0)  should be resulting in an error that you do
  not have enough arguments since the definition of test only takes one
  argument. After that is fixed, and you get the error you are seeing,
  it is because that is a COM error. As Amit mentioned,
  getCellByPosition takes two arguments - a row and a column. You only
  have something called id. You are instantiating your class with two
  arguments. Change that and getCellByPosition and you will be in
  business hope that helps
 
  On Jan 19, 10:53 am, dmitry...@gmail.com dmitry...@gmail.com
  wrote:
 
   That's not the answer I was looking for. but thanks.
 
   Just wondering what does arity mean?
 
   Dmitry
 


--~--~-~--~~~---~--~~
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: Recognizing the Search Text Box

2009-01-20 Thread wesley chen
Please try the code below.
require 'watir'
$ie=Watir::IE.attach(:title,//)
$ie.text_field(:name,'q').flash
$ie.text_field(:name,'q').set(Google search)

$ie.button(:value,/Search/).click

Thanks.
Wesley Chen.


On Wed, Jan 21, 2009 at 7:47 AM, ST stan...@lijit.com wrote:

 div id=pvssearchbox
  form id=pvssearchbox_form action=/search/seatanaka
  div class=floatcontainer style=margin-top: 4px; height:
 25px;
input style=width: 275px; float:left; border-color:#999;
 name=q type=text /input type=submit class=form-submit
 right_button noMask value=Search /
  /div


--~--~-~--~~~---~--~~
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: Recognizing the Search Text Box

2009-01-21 Thread wesley chen
Try code below:
require 'watir'
$ie=Watir::IE.start(http://www.lijit.com/users/seatanaka;)
$ie.form(:id,/pvssearchbox_form/).text_field(:name,'q').set(wahine)
$ie.button(:value,/Search/).click



Thanks.
Wesley Chen.


On Thu, Jan 22, 2009 at 5:20 AM, ST stan...@lijit.com wrote:

 http://www.lijit.com/users/seatanaka

--~--~-~--~~~---~--~~
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: Issue with using arguments within Open Office (column, row) code

2009-01-21 Thread wesley chen
Thanks, when we put our opinion here, we may study more from others
suggestion.

Thanks.
Wesley Chen.


On Thu, Jan 22, 2009 at 12:46 AM, dmitry...@gmail.com
dmitry...@gmail.comwrote:


 Hey Wesley, Sure thing. Will put up the solution here tonight. :) Just
 wanted to make sure I explain it clear as it's a bit of a hassle the
 way I've implemented it. I'm sure there has to be an easier way :0

 Thanks,
 Dmitry

 On Jan 19, 8:45 pm, wesley chen cjq@gmail.com wrote:
  Why don't you put your solution here and let more people learn from you?
  Why do you let others consult to you privately?
 
  Thanks.
  Wesley Chen.
 
  On Tue, Jan 20, 2009 at 2:26 AM, dmitry...@gmail.com 
 dmitry...@gmail.comwrote:
 
 
 
   Thanks guys for the comments guys, I already got it to work. Turned
   out a bit more complex but it works :) If anyone runs into this issue
   let me know, I'll try and guide ou through the steps I took.
 
   On Jan 19, 12:35 pm, bwaybandit lenridge...@gmail.com wrote:
arity is a computer science term for arguments to a function.
 
FirstTest.new.test (1, 0)  should be resulting in an error that you
 do
not have enough arguments since the definition of test only takes one
argument. After that is fixed, and you get the error you are seeing,
it is because that is a COM error. As Amit mentioned,
getCellByPosition takes two arguments - a row and a column. You only
have something called id. You are instantiating your class with two
arguments. Change that and getCellByPosition and you will be in
business hope that helps
 
On Jan 19, 10:53 am, dmitry...@gmail.com dmitry...@gmail.com
wrote:
 
 That's not the answer I was looking for. but thanks.
 
 Just wondering what does arity mean?
 
 Dmitry
 


--~--~-~--~~~---~--~~
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: Recognizing the Search Text Box

2009-01-21 Thread wesley chen
You're welcome.

Thanks.
Wesley Chen.


On Thu, Jan 22, 2009 at 3:34 PM, ST tanaka.sh...@gmail.com wrote:


 This code worked! Thanks so much for your help and quick replies,
 Wesley!

 On Jan 21, 6:30 pm, wesley chen cjq@gmail.com wrote:
  Try code below:
  require 'watir'
  $ie=Watir::IE.start(http://www.lijit.com/users/seatanaka;)
  $ie.form(:id,/pvssearchbox_form/).text_field(:name,'q').set(wahine)
  $ie.button(:value,/Search/).click
 
  Thanks.
  Wesley Chen.
 
 
 
  On Thu, Jan 22, 2009 at 5:20 AM, ST stan...@lijit.com wrote:
  http://www.lijit.com/users/seatanaka- 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: Handle 2 text boxes with same name

2009-02-09 Thread wesley chen
try:

@ie.text_field(:name = 'ngids', :index= 2).set('ATP00594978')

Thanks.
Wesley Chen.


On Mon, Feb 9, 2009 at 2:04 PM, Venugopal Devarakonda 
venugopal.devarako...@gmail.com wrote:

 Hi:

 The attached the snap shot of my webpage which has 2 blocks both identical
 in terms of class names, text field names etc.

 *To access the NG ID field i gave the below script:*

 puts  Step 5: Enter the ngid as ATP00594978
 @ie.text_field(:name, 'ngids', :index, 2).set('ATP00594978')

 For this i get this error:

 Error:
 test_3_Authorize_User(CSDPUIHomePage):
 ArgumentError: wrong number of arguments (4 for 2)
 auth_unath.rb:42:in `text_field'
 auth_unath.rb:42:in `test_3_Authorize_User'

 *But if i give the following:*

 puts  Step 5: Enter the ngid as ATP00594978
 @ie.text_field(:name, 'ngids').set('ATP00594978')

 It always updates the first NG ID.


 Let me know if i am missing out on something

 Regards
 Venu


 On Sat, Feb 7, 2009 at 10:21 PM, Charley Baker charley.ba...@gmail.comwrote:

 Multiple attributes for input elements are now supported in the latest
 version of Watir - 1.6.2. The wiki has also been updated.


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



 On Fri, Feb 6, 2009 at 11:20 PM, Vens venugopal.devarako...@gmail.comwrote:


 Hi:

 I just started using Watir for automating few web UIs. During this I
 came across a situation where I had to put in data to a text field but
 incidently there are 2 text boxes having the same name. Please look at
 the snippet below:

 div class=boxed
 h3 class=title Authorize NG IDs /h3
  form action=ser.do method=post name=sAFrm
   input type=hidden value=authorize name=dispatch/
   table
  tbody
tr
td colspan=2div class=infomark You can enter comma
 separated multiple ngids /div/td
/tr
tr
  th MID /th
  td select size=1 name=mid/select/td
   /tr
tr
  th NG IDs /th
   tdinput type=text value= size=100
 maxlength=200
 name=ngids//td
   /tr
 /tbody
 /table
 /form
 /div

 div class=boxed
 h3 class=title Authorize NG IDs /h3
  form action=ser.do method=post name=sAFrm
   input type=hidden value=unauthorize name=dispatch/
   table
  tbody
tr
td colspan=2div class=infomark You can enter comma
 separated multiple ngids /div/td
/tr
tr
  th MID /th
  td select size=1 name=mid/select/td
/tr
tr
  th NG IDs /th
   tdinput type=text value= size=100
 maxlength=200
 name=ngids//td
   /tr
 /tbody
 /table
 /form
 /div

 When I looked into
 http://wiki.openqa.org/display/WTR/Multiple+Attributesit
 said it is not implemented for input elements.  Can you help me solve
 this.

 Regards
 Venu







 


--~--~-~--~~~---~--~~
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 get the data in a SQL 2005 database table with ruby?

2009-02-10 Thread wesley chen
Suppose I have a SQL 2005 DB, db name: active, user id: wesley, password:
11, table_name: wesley_tb
How can I get all the data in the tb wesley_tb?

I have searched some resource, majorly two methods referred.
First require 'win32ole'
Second require 'dbi'

Is anybody familiar with the functions?

Really appreciate to your help.

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: How to get the data in a SQL 2005 database table with ruby?

2009-02-10 Thread wesley chen
Hi, Aidy,
I tried your way, but failed, you have not provide some method for user id,
user password input.
Would you please provide the information more detailed?

I find another solution which can well deal with this problem.
But I still expect your reply.

require 'win32ole'

class SqlServer
# This class manages database connection and queries
attr_accessor :connection, :data, :fields
attr_writer :username, :password

def initialize(host, username = 'sa', password='')
@connection = nil
@data = nil
@host = host
@username = username
@password = password
end

def open(database)
# Open ADO connection to the SQL Server database
connection_string =  Provider=SQLOLEDB.1;
connection_string  Persist Security Info=False;
connection_string  User id...@username};
connection_string  password...@password};
connection_string  Initial Catalog=#{database};
connection_string  Data source...@host};
connection_string  Network Library=dbmssocn
@connection = WIN32OLE.new('ADODB.Connection')
@connection.Open(connection_string)
end

def query(sql)
# Create an instance of an ADO Recordset
recordset = WIN32OLE.new('ADODB.Recordset')
# Open the recordset, using an SQL statement and the
# existing ADO connection
recordset.Open(sql, @connection)
# Create and populate an array of field names
@fields = []
recordset.Fields.each do |field|
@fields  field.Name
end
begin
# Move to the first record/row, if any exist
recordset.MoveFirst
# Grab all records
@data = recordset.GetRows
rescue
@data = []
end
recordset.Close
# An ADO Recordset's GetRows method returns an array
# of columns, so we'll use the transpose method to
# convert it to an array of rows
@data = @data.transpose
end

def close
@connection.Close
end
end
db = SqlServer.new('localhost', 'user_id', 'user_password')
db.open('DB_name')
db.query(SELECT * from table_name;)
p db.data
=begin
puts field_names = db.fields
cust = db.data
puts cust.size
puts cust[0].inspect
=end
db.close
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: How to Include a ruby Program inside another Ruby Program

2009-02-12 Thread wesley chen
Try
require File.dirname(__FILE__)+'/../***.rb

Thanks.
Wesley Chen.


On Fri, Feb 13, 2009 at 12:46 PM, malar malar.je...@gmail.com wrote:


 Hi,
 I have to include a ruby program inside another ruby program.
 i used the following command,

  require ' logintest.rb'

 But i am getting an error,

 c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
 core_ext/module/introspection.rb:70:in `const_get': no such file to
 load -- safariwatir (MissingSourceFile)..

 Thanks,
 Malar





 


--~--~-~--~~~---~--~~
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: problem in clicking span

2009-02-13 Thread wesley chen
Would you please provide more detail html information?

Thanks.
Wesley Chen.


On Fri, Feb 13, 2009 at 7:32 PM, jam ruby.wa...@gmail.com wrote:


 Hi,

 Iam having a menu which is getting identified as a link. when I click
 it iam getting a sub menu. where the submenu items are getting
 identified as a span. The problem is when i click( iam using ie.span
 (:text,span name).click ) nothing happens. Kindly help me in this.

 Thanks,
 jam
 


--~--~-~--~~~---~--~~
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: Radio button

2009-02-16 Thread wesley chen
Why don't you try  $ie.radio(...).checked?

Thanks.
Wesley Chen.


On Tue, Feb 17, 2009 at 2:44 PM, jam ruby.wa...@gmail.com wrote:


 Hi,

 how to check whether radio button is set or not. I tried with set?.
 does't work. How to do this?

 Thanks,
 Jam
 


--~--~-~--~~~---~--~~
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 check whether table cell is enabled or not?

2009-02-17 Thread wesley chen
Is it OK object.disabled?

Thanks.
Wesley Chen.


On Wed, Feb 18, 2009 at 2:22 PM, Prince3105 prince3...@gmail.com wrote:


 Hi Experts,

 I am a newbie to watir, in my application i have a scenario to check
 whether the table cells are enabled or not, after committing.

 I used obj.enabled? but it threw error. So please throw some light.

 Thanks,
 Prince3105
 


--~--~-~--~~~---~--~~
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: Want to deactivate the option of receiving mails from watir group

2009-02-19 Thread wesley chen
I will unsubscribe you right now.

Thanks.
Wesley Chen.


On Fri, Feb 20, 2009 at 1:31 PM, Parul Upadhyay parul.upadh...@infogain.com
 wrote:

   Hi friends,

 I need ur help regarding my account with watir.

 I want to unsubscribe my mail Id as I get around 50-60 mails per day and
 even more than 50-60.

 As this is my official id so I cannot keep them..due to space.

 Please help me.how can I subscribe.

 I tried thousands of link.

 Even by editing profile couldn't help.



 Thanks in advance

 Parul



 


--~--~-~--~~~---~--~~
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: Hiding the browser

2009-02-20 Thread wesley chen
Add $HIDE_IE=true
before your IE process has been created.
Thanks.
Wesley Chen.


On Sat, Feb 21, 2009 at 1:59 AM, Jason Shelton jas.shel...@hotmail.comwrote:

  All,

 Is there a new way of hiding the browser with Watir?  It seems that
 ie.visible = false no longer works.  Thanks alot.

 - Shelton

 --
 Windows Live™: E-mail. Chat. Share. Get more ways to connect. Check it
 out.http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_allup_explore_022009
 


--~--~-~--~~~---~--~~
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: Unable to open IE window

2009-02-23 Thread wesley chen
Hi, All,
I met this kind of problem recently tool.
Following Tony's advise, I remove Ruby1.8.6, then I reinstall by:
gem update --system
gem install watir

After successfully, I restart my system, run command
regsvr32 C:\ruby\lib\ruby\gems\1.8\gems\watir-1.6.2\lib\watir\AutoItX3.dll

Anything goes well.



Thanks.
Wesley Chen.


On Tue, Feb 17, 2009 at 4:32 AM, Ben benoit.lem...@gmail.com wrote:


 Hi Jaz,

 No... I didn't contact Daniel Berger yet because I wanted to do some
 more tests. I added more debug info to the involved gems and I found
 that the problem occurs at line 35 of windows-pr-1.0.1\lib\windows
 \msvcrt\string.rb...
 In that file at line 35, a call is made to strtok_s and this method is
 not found in my versions of the dlls. If I replace strtok_s with
 strtok everything works perfectly. According to what I've found on
 the net about strtok, it is better to use strtok_s instead of strtok
 since strtok uses a static variable to store the current token
 position and this issue has been fixed in strtok_s. It means that the
 file string.rb of the windows-pr gems is OK and I should not be using
 strtok. I suppose strtok_s is not found on my system because windows
 loads an older version of the dll containing the method. Does someone
 know which dll contains strtok/strtok_s?

 Thanks a lot for the help!

 Ben

 On Feb 13, 7:16 am, Jaz jasmin.chazarr...@gmail.com wrote:
  Hi!
 
  Ben, did you get any help from Daniel Berger?
 
  The first thing I thought was just that there was some kind of
  conflict with Visual Studio. I have installed Visual Web developer
  2008 and visual studio.
  It's really strange because my colleague have the same programs
  installed but she doesn't have any problem with watir, ruby.
 
  (Though, I think she installed watir BEfore she installed the other
  microsoft products...)
 
  /Jasmin
 
  On 12 Feb, 17:11, Bret Pettichord b...@pettichord.com wrote:
 
   Maybe.
 
   You should talk to Daniel Berger, who maintains the windows gems. I
   don't think he reads this list.
   djber...@gmail.com
 
   Bret
 
   Ben wrote:
Ok... I tried a brand new installation of Ruby and Watir on a fresh
win xp install using a VMWare virtual machine and everything works
perfectly... I have both MS Visual Studio 2005 and Visual Studio 6.0
installed on my computer... I'm starting to beleive it might be a dll
version conflict caused by Visual Studio... What do you think of
 this?
Is it possible?
 
Ben
 
On Feb 12, 9:19 am, Ben benoit.lem...@gmail.com wrote:
 
I tried to completely uninstall (using gem uninstall packagename)
and re-install win32-* gems, windows-* gems and Watir.. I still have
the same problem. Here's my gem list :
 
*** LOCAL GEMS ***
 
activesupport (2.2.2)
builder (2.1.2)
commonwatir (1.6.2)
firewatir (1.6.2)
fxri (0.3.6)
fxruby (1.6.16)
hoe (1.8.3)
hpricot (0.6.164)
log4r (1.0.5)
ptools (1.1.6)
rake (0.8.3)
ruby-opengl (0.60.0)
rubyforge (1.0.2)
s4t-utils (1.0.4)
test-unit (2.0.2, 2.0.1)
user-choices (1.1.6)
watir (1.6.2)
win32-api (1.3.0)
win32-process (0.6.0)
windows-api (0.3.0)
windows-pr (1.0.1)
xml-simple (1.0.11)
 
and here's my ENV :
 
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.1
  - RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
  - INSTALLATION DIRECTORY: C:/Ruby/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: C:/Ruby/bin/ruby.exe
  - EXECUTABLE DIRECTORY: C:/Ruby/bin
  - RUBYGEMS PLATFORMS:
- ruby
- x86-mswin32-60
  - GEM PATHS:
 - C:/Ruby/lib/ruby/gems/1.8
 - C:/Documents and Settings/benoit.MSHEADOFFICE/.gem/ruby/1.8
  - GEM CONFIGURATION:
 - :update_sources = true
 - :verbose = true
 - :benchmark = false
 - :backtrace = false
 - :bulk_threshold = 1000
  - REMOTE SOURCES:
 -http://gems.rubyforge.org/
 
Thanks for your help!
 
Ben Lemire
 
On Feb 12, 1:58 am, Bret Pettichord b...@pettichord.com wrote:
 
I think you need to do more than that. The problem seems to be that
there bad versions of these gems out there, and that they were
 fixed
without changing the version number. So the gem installer won't
 update
your gem.
 
The solution, therefore, would be uninstall these gems and then
reinstall them.
 
Bret
 
Charley Baker wrote:
 
It seems there are some compatibility issues here with some of the
win32utils. Try updating your win32-api gem, win32-process and the
windows-pr gem as well.  Same instructions that Aidy mentioned
 before
with those gems.
 
Charley Baker
blog:http://charleybakersblog.blogspot.com/
Lead Developer, Watir,http://wtr.rubyforge.org
QA Architect, Gap Inc Direct
 
On Thu, Feb 5, 2009 at 6:51 AM, aidy lewis 
 aidy.le...@googlemail.com
mailto:aidy.le...@googlemail.com wrote

[wtr-general] Re: Hiding the browser

2009-02-23 Thread wesley chen
There are many kinds of pop up window. Which kind would you like to forbid?
 You can search on the net about how to avoid the pop up by setting in
Internet - Option.


You many make a summary about it. That would be helpful to all of us.



Thanks.
Wesley Chen.


On Mon, Feb 23, 2009 at 10:27 PM, Jason Shelton jas.shel...@hotmail.comwrote:

  Is there a way to hide popups too?  Your recommendation worked, but when a
 popup is prompted, the browser is no longer hidden.  Thanks in advance.

 - Shelton

 --
 Date: Sat, 21 Feb 2009 12:39:10 +0800
 Subject: [wtr-general] Re: Hiding the browser
 From: cjq@gmail.com
 To: watir-general@googlegroups.com


 Add $HIDE_IE=true
 before your IE process has been created.
 Thanks.
 Wesley Chen.


 On Sat, Feb 21, 2009 at 1:59 AM, Jason Shelton jas.shel...@hotmail.comwrote:

 All,

 Is there a new way of hiding the browser with Watir?  It seems that
 ie.visible = false no longer works.  Thanks alot.

 - Shelton

 --
 Windows Live™: E-mail. Chat. Share. Get more ways to connect. Check it
 out.http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_allup_explore_022009



 


--~--~-~--~~~---~--~~
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: Unable to open IE window

2009-02-24 Thread wesley chen
I tried on my another machine that:
gem list --local   # Get all the gems I have installed

If there are more than one version of the gems installed, I
gem uninstall (repeated gems)
# Except
actionmailer (2.2.2, 2.1.1)
actionpack (2.2.2, 2.1.1)
activerecord (2.2.2, 2.1.1)
activeresource (2.2.2, 2.1.1)
activesupport (2.2.2, 2.1.1)
with dependent attributes
then select the old version

After that, I won't need restart my system and uninstall ruby, I find:
require 'watir'
$ie=Watir::IE.new
can work.

You may have a try.
If you failed, you can do as the previous letter.

Thanks.
Wesley Chen.


On Tue, Feb 24, 2009 at 2:56 PM, wesley chen cjq@gmail.com wrote:

 Hi, All,
 I met this kind of problem recently tool.
 Following Tony's advise, I remove Ruby1.8.6, then I reinstall by:
 gem update --system
 gem install watir

 After successfully, I restart my system, run command
 regsvr32 C:\ruby\lib\ruby\gems\1.8\gems\watir-1.6.2\lib\watir\AutoItX3.dll

 Anything goes well.



 Thanks.
 Wesley Chen.



 On Tue, Feb 17, 2009 at 4:32 AM, Ben benoit.lem...@gmail.com wrote:


 Hi Jaz,

 No... I didn't contact Daniel Berger yet because I wanted to do some
 more tests. I added more debug info to the involved gems and I found
 that the problem occurs at line 35 of windows-pr-1.0.1\lib\windows
 \msvcrt\string.rb...
 In that file at line 35, a call is made to strtok_s and this method is
 not found in my versions of the dlls. If I replace strtok_s with
 strtok everything works perfectly. According to what I've found on
 the net about strtok, it is better to use strtok_s instead of strtok
 since strtok uses a static variable to store the current token
 position and this issue has been fixed in strtok_s. It means that the
 file string.rb of the windows-pr gems is OK and I should not be using
 strtok. I suppose strtok_s is not found on my system because windows
 loads an older version of the dll containing the method. Does someone
 know which dll contains strtok/strtok_s?

 Thanks a lot for the help!

 Ben

 On Feb 13, 7:16 am, Jaz jasmin.chazarr...@gmail.com wrote:
  Hi!
 
  Ben, did you get any help from Daniel Berger?
 
  The first thing I thought was just that there was some kind of
  conflict with Visual Studio. I have installed Visual Web developer
  2008 and visual studio.
  It's really strange because my colleague have the same programs
  installed but she doesn't have any problem with watir, ruby.
 
  (Though, I think she installed watir BEfore she installed the other
  microsoft products...)
 
  /Jasmin
 
  On 12 Feb, 17:11, Bret Pettichord b...@pettichord.com wrote:
 
   Maybe.
 
   You should talk to Daniel Berger, who maintains the windows gems. I
   don't think he reads this list.
   djber...@gmail.com
 
   Bret
 
   Ben wrote:
Ok... I tried a brand new installation of Ruby and Watir on a fresh
win xp install using a VMWare virtual machine and everything works
perfectly... I have both MS Visual Studio 2005 and Visual Studio 6.0
installed on my computer... I'm starting to beleive it might be a
 dll
version conflict caused by Visual Studio... What do you think of
 this?
Is it possible?
 
Ben
 
On Feb 12, 9:19 am, Ben benoit.lem...@gmail.com wrote:
 
I tried to completely uninstall (using gem uninstall packagename)
and re-install win32-* gems, windows-* gems and Watir.. I still
 have
the same problem. Here's my gem list :
 
*** LOCAL GEMS ***
 
activesupport (2.2.2)
builder (2.1.2)
commonwatir (1.6.2)
firewatir (1.6.2)
fxri (0.3.6)
fxruby (1.6.16)
hoe (1.8.3)
hpricot (0.6.164)
log4r (1.0.5)
ptools (1.1.6)
rake (0.8.3)
ruby-opengl (0.60.0)
rubyforge (1.0.2)
s4t-utils (1.0.4)
test-unit (2.0.2, 2.0.1)
user-choices (1.1.6)
watir (1.6.2)
win32-api (1.3.0)
win32-process (0.6.0)
windows-api (0.3.0)
windows-pr (1.0.1)
xml-simple (1.0.11)
 
and here's my ENV :
 
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.1
  - RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
  - INSTALLATION DIRECTORY: C:/Ruby/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: C:/Ruby/bin/ruby.exe
  - EXECUTABLE DIRECTORY: C:/Ruby/bin
  - RUBYGEMS PLATFORMS:
- ruby
- x86-mswin32-60
  - GEM PATHS:
 - C:/Ruby/lib/ruby/gems/1.8
 - C:/Documents and Settings/benoit.MSHEADOFFICE/.gem/ruby/1.8
  - GEM CONFIGURATION:
 - :update_sources = true
 - :verbose = true
 - :benchmark = false
 - :backtrace = false
 - :bulk_threshold = 1000
  - REMOTE SOURCES:
 -http://gems.rubyforge.org/
 
Thanks for your help!
 
Ben Lemire
 
On Feb 12, 1:58 am, Bret Pettichord b...@pettichord.com wrote:
 
I think you need to do more than that. The problem seems to be
 that
there bad versions of these gems out there, and that they were
 fixed
without changing the version number. So the gem installer won't

[wtr-general] Re: Unable to open IE window

2009-02-24 Thread wesley chen
Sorry, we can also remove the old version of
actionmailer (2.2.2, 2.1.1)
actionpack (2.2.2, 2.1.1)
activerecord (2.2.2, 2.1.1)
activeresource (2.2.2, 2.1.1)
activesupport (2.2.2, 2.1.1)

We can remove all the 2.1.1 version
because the 2.2.2 dependent with each other with 2.2.2

Thanks.
Wesley Chen.


On Tue, Feb 24, 2009 at 10:02 PM, wesley chen cjq@gmail.com wrote:

 I tried on my another machine that:
 gem list --local   # Get all the gems I have installed

 If there are more than one version of the gems installed, I
 gem uninstall (repeated gems)
 # Except
 actionmailer (2.2.2, 2.1.1)
 actionpack (2.2.2, 2.1.1)
 activerecord (2.2.2, 2.1.1)
 activeresource (2.2.2, 2.1.1)
 activesupport (2.2.2, 2.1.1)
 with dependent attributes
 then select the old version

 After that, I won't need restart my system and uninstall ruby, I find:
 require 'watir'
 $ie=Watir::IE.new
 can work.

 You may have a try.
 If you failed, you can do as the previous letter.

 Thanks.
 Wesley Chen.



 On Tue, Feb 24, 2009 at 2:56 PM, wesley chen cjq@gmail.com wrote:

 Hi, All,
 I met this kind of problem recently tool.
 Following Tony's advise, I remove Ruby1.8.6, then I reinstall by:
 gem update --system
 gem install watir

 After successfully, I restart my system, run command
 regsvr32 C:\ruby\lib\ruby\gems\1.8\gems\watir-1.6.2\lib\watir\AutoItX3
 .dll

 Anything goes well.



 Thanks.
 Wesley Chen.



 On Tue, Feb 17, 2009 at 4:32 AM, Ben benoit.lem...@gmail.com wrote:


 Hi Jaz,

 No... I didn't contact Daniel Berger yet because I wanted to do some
 more tests. I added more debug info to the involved gems and I found
 that the problem occurs at line 35 of windows-pr-1.0.1\lib\windows
 \msvcrt\string.rb...
 In that file at line 35, a call is made to strtok_s and this method is
 not found in my versions of the dlls. If I replace strtok_s with
 strtok everything works perfectly. According to what I've found on
 the net about strtok, it is better to use strtok_s instead of strtok
 since strtok uses a static variable to store the current token
 position and this issue has been fixed in strtok_s. It means that the
 file string.rb of the windows-pr gems is OK and I should not be using
 strtok. I suppose strtok_s is not found on my system because windows
 loads an older version of the dll containing the method. Does someone
 know which dll contains strtok/strtok_s?

 Thanks a lot for the help!

 Ben

 On Feb 13, 7:16 am, Jaz jasmin.chazarr...@gmail.com wrote:
  Hi!
 
  Ben, did you get any help from Daniel Berger?
 
  The first thing I thought was just that there was some kind of
  conflict with Visual Studio. I have installed Visual Web developer
  2008 and visual studio.
  It's really strange because my colleague have the same programs
  installed but she doesn't have any problem with watir, ruby.
 
  (Though, I think she installed watir BEfore she installed the other
  microsoft products...)
 
  /Jasmin
 
  On 12 Feb, 17:11, Bret Pettichord b...@pettichord.com wrote:
 
   Maybe.
 
   You should talk to Daniel Berger, who maintains the windows gems. I
   don't think he reads this list.
   djber...@gmail.com
 
   Bret
 
   Ben wrote:
Ok... I tried a brand new installation of Ruby and Watir on a fresh
win xp install using a VMWare virtual machine and everything works
perfectly... I have both MS Visual Studio 2005 and Visual Studio
 6.0
installed on my computer... I'm starting to beleive it might be a
 dll
version conflict caused by Visual Studio... What do you think of
 this?
Is it possible?
 
Ben
 
On Feb 12, 9:19 am, Ben benoit.lem...@gmail.com wrote:
 
I tried to completely uninstall (using gem uninstall
 packagename)
and re-install win32-* gems, windows-* gems and Watir.. I still
 have
the same problem. Here's my gem list :
 
*** LOCAL GEMS ***
 
activesupport (2.2.2)
builder (2.1.2)
commonwatir (1.6.2)
firewatir (1.6.2)
fxri (0.3.6)
fxruby (1.6.16)
hoe (1.8.3)
hpricot (0.6.164)
log4r (1.0.5)
ptools (1.1.6)
rake (0.8.3)
ruby-opengl (0.60.0)
rubyforge (1.0.2)
s4t-utils (1.0.4)
test-unit (2.0.2, 2.0.1)
user-choices (1.1.6)
watir (1.6.2)
win32-api (1.3.0)
win32-process (0.6.0)
windows-api (0.3.0)
windows-pr (1.0.1)
xml-simple (1.0.11)
 
and here's my ENV :
 
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.1
  - RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
  - INSTALLATION DIRECTORY: C:/Ruby/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: C:/Ruby/bin/ruby.exe
  - EXECUTABLE DIRECTORY: C:/Ruby/bin
  - RUBYGEMS PLATFORMS:
- ruby
- x86-mswin32-60
  - GEM PATHS:
 - C:/Ruby/lib/ruby/gems/1.8
 - C:/Documents and Settings/benoit.MSHEADOFFICE/.gem/ruby/1.8
  - GEM CONFIGURATION:
 - :update_sources = true
 - :verbose = true
 - :benchmark = false
 - :backtrace = false
 - :bulk_threshold

[wtr-general] Re: $ie.maximize

2009-03-03 Thread wesley chen
If you install Ruby in your c:\, please run command:
regsvr32 C:\ruby\lib\ruby\gems\1.8\gems\watir-1.6.2\lib\watir\AutoItX3.dll


Thanks.
Wesley Chen.


On Tue, Mar 3, 2009 at 5:23 PM, Vikas Tulashyam vtulash...@gmail.comwrote:


 Hi Friends,
 I am not able to use the maximize method of IE class. Please see the
 below code. An error is thrown for maximize method. Please suggest if
 something wrong--


 require 'watir'
 require 'test/unit'

 class TestSuite_IRCTC  Test::Unit::TestCase

 $ie = Watir::Browser.new
 $test_site = 'http://www.irctc.co.in'

  def test_01_OpenApps

  puts 'TC_RR_001- Open the IRCTC site: www.irctc.co.ic'
$ie.maximize
$ie.goto($test_site)


  end


 end




 


--~--~-~--~~~---~--~~
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: Add date

2009-03-03 Thread Wesley Chen

Hi, Prince, please try the code below:

require 'watir'
def date_validation( source, count, operation)
start_date = source
date = Date.strptime(start_date, '%d-%b-%Y')
if operation == a or operation==A
date += count
elsif operation == d or operation==D
date-= count
end
time=Time.mktime(date.year, date.month, date.day)
return time.strftime(%d-%b-%Y)
end

date1=03-mar-2009
puts date_validation(date1, 10, A)


Output is:
13-Mar-2009
--~--~-~--~~~---~--~~
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: script for div class using ruby watir

2009-03-06 Thread wesley chen
I tried you methods, they are all OK.


Thanks.
Wesley Chen.


On Fri, Mar 6, 2009 at 10:05 PM, suresh babu ksb25...@gmail.com wrote:

   div class=clear/div

 div class=buttonholder

   div class=btnleft/div

   input name=addbutton value=Add onclick=AddButton
 () class=btncenter type=button



  div class=btnright/div


 Iam trying to click on add button using Ruby watir .But here iam
 getting the error as Unabel to recognize
 iam using below code for above html source code.
 $ie.button(:name, addbutton).click
  $ie.button(:value, Add ).click
 or
 ie.button(:name, addbutton).click
 ie.button(:value, Add ).click
 


--~--~-~--~~~---~--~~
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 change the array to a string?

2009-03-10 Thread wesley chen
Suppose I have an array arr1 like: [2, 3, [2, 3, 2]]
When I use: p arr1,
I will get: [2, 3, [2, 3, 2]]
I would like to save the [2, 3, [2, 3, 2]] as a string
[2, 3, [2, 3, 2]], how to make it?


Appreciated to any suggestion.

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] How to shrink to fit in Excel?

2009-03-10 Thread wesley chen
When I practice on excel methods, I can make the columns a:d to autoFit by:

@@worksheet.columns(a:d).AutoFit

Is there any method shrink to fit?

Can anybody provide the documents or url talking about MS excel methods?

Appreciate to any suggestion.


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: How to shrink to fit in Excel?

2009-03-10 Thread wesley chen
Hi, Tiffany,
Thank you very much.


Thanks.
Wesley Chen.


On Wed, Mar 11, 2009 at 3:14 AM, George george.sand...@gmail.com wrote:


 Thanks for the link, Tiffany!  A lot of good stuff here.

 On Mar 10, 9:01 am, Tiffany Fodor tcfo...@comcast.net wrote:
  Hey Wesley!
 
  I've never seen anything like that, but I've never looked for it
  either.  This blog has some great examples on working with excel in
  ruby.  Maybe you can find what you're looking for there.
 
  http://rubyonwindows.blogspot.com/
 
  -Tiffany
 
  On Mar 10, 3:56 am, wesley chen cjq@gmail.com wrote:
 
   When I practice on excel methods, I can make the columns a:d to autoFit
 by:
 
   @@worksheet.columns(a:d).AutoFit
 
   Is there any method shrink to fit?
 
   Can anybody provide the documents or url talking about MS excel
 methods?
 
   Appreciate to any suggestion.
 
   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: How to add any data into the EXCEL sheet using Excel interface class

2009-03-11 Thread wesley chen
Why don't you search in the group? There are hundreds of articles and
answers in the group. I am sure you can find what you want in it.
Thanks.
Wesley Chen.


On Wed, Mar 11, 2009 at 5:17 PM, nagmani vm nagman...@gmail.com wrote:

 Hi
  Can you pls let me know how to upload a file in RUby watir. and how to
 handlw windows print window and java pop ups

 On Tue, Mar 10, 2009 at 5:17 PM, rrash586 rrash...@gmail.com wrote:


 Hello all actually in the below program i m trying to Retrieve  data
 from one excel sheet and place that data on text field of google page
 and after click on search button  will navigate to search result page
 Now i want to take this url(ie.url) of webpage and  write it on
 other EXCEL sheet .But I m unable to add it using Xls method
 write2DArray()

 How to add single element in excel sheet using Xls(Excel Interface
 Class) class

 can anyone suggest me how to do it  using Xls
 Thanks in advance



 require 'Xls'
 require 'watir'

 xlFile = XLS.new(D:\\test_XLS_data.xls) #grab the data file in the
 same dirrectory
 myData = xlFile.getRowRecords('Google Search Data','Example')  #pull
 data records  from excel
 xlFile.close

 $j=0
 $array =Array.new
 myData.each do |record|
  ie = Watir::IE.start('google.com')
  ie.text_field(:name,'q').set(record['SearchString'])
  ie.button(:name,'btnG').click
  result =ie.url
 $array[$j] =result
 $j=$j+1
 ie.close
 end

 xlFile = XLS.new(D:\\result_xls.xls)




 --
 Thanks  Regards,
  Nagmani V.M.


 


--~--~-~--~~~---~--~~
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 print all the methods in the Class or Module out?

2009-03-12 Thread wesley chen
Thanks.

class.instance_methods
module.instance_methods make it.


Thanks.
Wesley Chen.


On Thu, Mar 12, 2009 at 5:32 PM, wesley chen cjq@gmail.com wrote:

 Hi, Zeljko,
 Sorry, I have not demonstrated clearly enough.

 Suppose I have written a module or a class, in the module or class, I have
 written many methods. I would like to print all my methods out.
 How can I make it?


 Any suggestion would be appreciated.
 Thanks.
 Wesley Chen.


 On Thu, Mar 12, 2009 at 5:24 PM, Željko Filipin
 zeljko.fili...@wa-research.ch wrote:

 On Thu, Mar 12, 2009 at 10:18, wesley chen cjq@gmail.com wrote:
  How to print the methods in the class or module out?

 Wesley,

 you need this?

  a = 
 = 
  a.methods
 = [%, select, []=, inspect, , each_byte, clone, method,
 gsub, casecmp, public_methods, to_str, partition, tr_s,
 ...
 capitalize!, scan, []]



 Željko

 



--~--~-~--~~~---~--~~
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 print all the methods in the Class or Module out?

2009-03-12 Thread wesley chen
Hi, Zeljko,
Sorry, I have not demonstrated clearly enough.

Suppose I have written a module or a class, in the module or class, I have
written many methods. I would like to print all my methods out.
How can I make it?


Any suggestion would be appreciated.
Thanks.
Wesley Chen.


On Thu, Mar 12, 2009 at 5:24 PM, Željko Filipin
zeljko.fili...@wa-research.ch wrote:

 On Thu, Mar 12, 2009 at 10:18, wesley chen cjq@gmail.com wrote:
  How to print the methods in the class or module out?

 Wesley,

 you need this?

  a = 
 = 
  a.methods
 = [%, select, []=, inspect, , each_byte, clone, method,
 gsub, casecmp, public_methods, to_str, partition, tr_s,
 ...
 capitalize!, scan, []]



 Željko

 


--~--~-~--~~~---~--~~
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: Sleep function

2009-03-12 Thread wesley chen
:), you're right.


Thanks.
Wesley Chen.


On Thu, Mar 12, 2009 at 4:49 PM, Jarmo Pertman jarm...@gmail.com wrote:


 Why did you use all of this while loop and Time.now and stuff, when
 sleep 5*60 was the only line needed to sleep for 5 minutes?

 Jarmo

 On Mar 5, 3:15 am, wesley chen cjq@gmail.com wrote:
  If you want to sleep 5 mins, please try the code below:
 
  require 'watir'
  t=Time.now
  while (Time.now-t)1
  sleep 300
  end
  puts OK
 
  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] How to print all the methods in the Class or Module out?

2009-03-12 Thread wesley chen
Hi, Guys,
How to print the methods in the class or module out?

Any suggestion would be appreciated.


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: Watir users: What is your role at work?

2009-03-16 Thread wesley chen
Hi, All,
This is Wesley, from ShanXi Xi'an China, I work for Active Network.
I became a black-box tester about two years ago when I was graduated.
Now I am still a black-box tester, sometimes the test is really repeated.
Watir automation is interesting, it can kind of improve my work efficiency.
I am the only automation tester in my web test team.
So What a proud thing it is if I create the whole automation test frame for
my project, from the design, to the code, to the test, and even if I leave
the company, the new comers find the code is so easy to read, to maintain!
It will be still a long way for me to complete it, but cheer up!


Thanks.
Wesley Chen.


On Mon, Mar 16, 2009 at 5:35 PM, Natasha Ranney itsn...@yahoo.co.uk wrote:

 Hi All,

 I have been into testing for about 6 years. My testing experience has
 mostly been into testing on unix platforms and C-Api testing.

 My current job is around testing of a website. Hence this is the first time
 I started looking out for automated test tools for website automation.
 This is how I got to learn about Watir and I enjoy working with Watir. So
 far I have used Perl and Ruby is quite similar to Perl.

 Manual testing can become monotonous and hence doing automation using Watir
 makes the job interesting.

 Cheers,
 Natasha


 


--~--~-~--~~~---~--~~
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: accessing tableCell through XPath

2009-03-16 Thread wesley chen
Try: ie.cell(:xpath, //td[contains(text(), 'Sales')]/).click


Thanks.
Wesley Chen.


On Mon, Mar 16, 2009 at 8:56 PM, Shylaja shylaja.ra...@gmail.com wrote:

 ie.cell(:xpath, //td[contains(., 'Sales')]/).click()


--~--~-~--~~~---~--~~
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 problem with IE

2009-03-16 Thread wesley chen
You may know all the ie windows attributes by:
Watir::IE.each { |ie|
 puts ie.title
puts ie.url
}

You can locate the special ie window by:
ie=Watir::IE.find(:title,/ie_title_name/)  # ie=Watir::IE.find(:url,
/ie_url/)
ie.goto(...)


Thanks.
Wesley Chen.


On Mon, Mar 16, 2009 at 9:54 PM, Al Snow jas...@hotmail.com wrote:

  The answer (assuming you are running Vista) is in the Watir FAQ
 http://wiki.openqa.org/display/WTR/FAQ#FAQ-WhatshouldIdoiftwobrowserwindowsappearwhenrunningatestunderWindowsVista%3F
 under
 What should I do if two browser windows appear when running a test under
 Windows Vista?
 Thanks,
 Al Snow
 Agile Software Automation Developer
 Linkedin: http://www.linkedin.com/in/alsnow
 Google Talk: jasnow1
 Twitter: jasnow

  Date: Mon, 16 Mar 2009 02:45:21 -0700
  Subject: [wtr-general] Watir problem with IE
  From: rakeshg...@gmail.com
  To: watir-general@googlegroups.com

 
 
  Hi,
 
  When i execute the following code
 
  ie = Watir::IE.new()
  ie.goto(http://www.yahoo.com;)
 
  it opens a new IE window first and then goes to a second window, where
  yahoo.com is opened. When i give a command like ie.refresh() or access
  ie.html it is the first window ( which is blank ) that is being
  refreshed. Can you please suggest how to avoid multiple windows being
  opened and also how to save a webpage opened like this?
 
  Thanks,
  Rakesh Pai
 
  


--~--~-~--~~~---~--~~
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 change a ruby file into an .exe file

2009-03-18 Thread wesley chen
Two steps to make the .rb file to .exe file.

1. go to your command line, run
gem install rubyscript2exe
2. Go to your main.rb file directory, run
rubyscript2exe main.rb

It will make the main.rb into main.exe

Thanks.
Wesley Chen.


On Sat, Feb 28, 2009 at 12:50 AM, Jarmo Pertman jarm...@gmail.com wrote:


 Or use rubyscript2exe, which also supports Linux and OSX.

 You can read more about it from here
 http://www.erikveen.dds.nl/rubyscript2exe/

 On Feb 20, 10:38 am, Wilson Xu xu.xiaodong.wil...@gmail.com wrote:
  refer tohttp://rubyforge.org/projects/exerb/project.
 
  Wilson
 


--~--~-~--~~~---~--~~
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 change a ruby file into an .exe file

2009-03-18 Thread wesley chen
A problem exists:
I create two .rb file in the same directory
first is test1.rb, with code:
require 'watir'
$ie=Watir::IE.new

second is test2.rb, with code:
*require  File.join(Dir.pwd, 'test1.rb')*
$ie.goto(www.baidu.com)
puts OK
$ie.text_field(:id,'kw').set(www.baidu.com)
$ie.button(:id,'sb').click
puts OK
$ie.close

When I go to the right file directory, run
rubyscript2exe test2.rb

I get test2.exe, it can be executed as expected.

Problem is: When I change the
*require File.join(Dir.pwd, 'test1.rb')*
to
*require File.dirname(__FILE__) +'/test1.rb'* # *require
File.dirname(__FILE__) +'\\test1.rb'*
I can
*rubyscript2exe test2.rb*
into
*test2.exe*
 as expected.
But when I execute test2.exe, I get error message:
*No such file to load --***\app\test1.rb(LoadError)
*
In my project, I use require File.dirname(__FILE__) + '/../..' anywhere, so
how can make it so that, the exe file can be executed?


Any suggestion would be quite appreciated.

Thanks.
Wesley Chen.


On Wed, Mar 18, 2009 at 8:22 PM, wesley chen cjq@gmail.com wrote:

 Two steps to make the .rb file to .exe file.

 1. go to your command line, run
 gem install rubyscript2exe
 2. Go to your main.rb file directory, run
 rubyscript2exe main.rb

 It will make the main.rb into main.exe

 Thanks.
 Wesley Chen.



 On Sat, Feb 28, 2009 at 12:50 AM, Jarmo Pertman jarm...@gmail.com wrote:


 Or use rubyscript2exe, which also supports Linux and OSX.

 You can read more about it from here
 http://www.erikveen.dds.nl/rubyscript2exe/

 On Feb 20, 10:38 am, Wilson Xu xu.xiaodong.wil...@gmail.com wrote:
  refer tohttp://rubyforge.org/projects/exerb/project.
 
  Wilson
 



--~--~-~--~~~---~--~~
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: Multiple Attributes and form

2009-03-19 Thread wesley chen
May be It is not a form.

Thanks.
Wesley Chen.


On Thu, Mar 19, 2009 at 2:35 PM, alexey s. radiact...@gmail.com wrote:


 next code:

 p ff.form(:id, /delete_access34074/).exist?
 html = ff.html
 p html.scan(/id=\delete_access34074\/)

 And I execute this:

 $ ruby test.rb
 false
 [id=\delete_access34074\]

 Why ?



 


--~--~-~--~~~---~--~~
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: Multiple Attributes and form

2009-03-19 Thread wesley chen
For this form, where is the name f? And the id delete_access41599 is
rand?

Thanks.
Wesley Chen.


2009/3/19 alexey s. radiact...@gmail.com


 where is the id delete_access34074?

 It's other page and form:

 form action=user.pl method=post id=delete_access41599
   input type=submit value=Отвязать
 /form

 


--~--~-~--~~~---~--~~
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: Need help on this issue

2009-03-19 Thread wesley chen
Sorry, should be clearSelection
Thanks.
Wesley Chen.


On Thu, Mar 19, 2009 at 7:52 PM, nagmani vm nagman...@gmail.com wrote:

 This code is not working am getting error like this:
  undefined method `clear' for #Watir::SelectList:0x415b4f0
 (NoMethodError)

 On Thu, Mar 19, 2009 at 5:16 PM, wesley chen cjq@gmail.com wrote:

 Will you try:
 ie.select_list(:name,inspectionStatus).clear
 ie.select_list(:name,inspectionStatus).set(Partial)


 Thanks.
 Wesley Chen.



 On Thu, Mar 19, 2009 at 7:34 PM, Shweta nagman...@gmail.com wrote:


 Hi

 I have a selection box in my application and its having scroll down
 option with this by default one item will be selectd in that,manually
 if i am selecting other item the default one will be deselcted and
 recent one will get selected but when i am running a script in watir
 it behaves as control i mean its selecting both the default one and
 selected one i have written code like this:

 ie.select_list(:name,inspectionStatus).set(Partial)

 the default one will be All from the list box

 when i am running this line of code i should be able to get only
 partial status inspections/records but am getting both types of
 records.What might be the problem?

 Can anyone pls let me know?


 


--~--~-~--~~~---~--~~
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: Need help on this issue

2009-03-19 Thread wesley chen
When you have questions, please ask on the group so that everybody can see
it.
Few months ago, I am the same kind of new guy as you in Watir, :), but I
still have to study a lot.
I will try my best to help you.


Thanks.
Wesley Chen.


On Thu, Mar 19, 2009 at 7:59 PM, nagmani vm nagman...@gmail.com wrote:

 Ok thank you very much its working fine

 Can i have your mai id?i am new to watir if i come across any queries i can
 ask u?

 On Thu, Mar 19, 2009 at 5:25 PM, wesley chen cjq@gmail.com wrote:

 Sorry, should be clearSelection
 Thanks.
 Wesley Chen.



 On Thu, Mar 19, 2009 at 7:52 PM, nagmani vm nagman...@gmail.com wrote:

 This code is not working am getting error like this:
  undefined method `clear' for #Watir::SelectList:0x415b4f0
 (NoMethodError)

   On Thu, Mar 19, 2009 at 5:16 PM, wesley chen cjq@gmail.comwrote:

 Will you try:
 ie.select_list(:name,inspectionStatus).clear
 ie.select_list(:name,inspectionStatus).set(Partial)


 Thanks.
 Wesley Chen.



 On Thu, Mar 19, 2009 at 7:34 PM, Shweta nagman...@gmail.com wrote:


 Hi

 I have a selection box in my application and its having scroll down
 option with this by default one item will be selectd in that,manually
 if i am selecting other item the default one will be deselcted and
 recent one will get selected but when i am running a script in watir
 it behaves as control i mean its selecting both the default one and
 selected one i have written code like this:

 ie.select_list(:name,inspectionStatus).set(Partial)

 the default one will be All from the list box

 when i am running this line of code i should be able to get only
 partial status inspections/records but am getting both types of
 records.What might be the problem?

 Can anyone pls let me know?








 --
 Thanks  Regards,
  Nagmani V.M.

 


--~--~-~--~~~---~--~~
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: Need help on this issue

2009-03-19 Thread wesley chen
When you would like to ask a question, please search in the group at first.
In fact, there are many existing good though in the group about your
question.
When you compile the script again and again, meet different kind of problems
and then solve them, you may study more.

Thanks.
Wesley Chen.


On Thu, Mar 19, 2009 at 8:08 PM, nagmani vm nagman...@gmail.com wrote:

 Ok fine thanks

 and i have one more query How to handle window related pop ups like Print
 window and Choose file dialogs while uploading a file

 On Thu, Mar 19, 2009 at 5:36 PM, wesley chen cjq@gmail.com wrote:

 When you have questions, please ask on the group so that everybody can see
 it.
 Few months ago, I am the same kind of new guy as you in Watir, :), but I
 still have to study a lot.
 I will try my best to help you.


 Thanks.
 Wesley Chen.


   On Thu, Mar 19, 2009 at 7:59 PM, nagmani vm nagman...@gmail.comwrote:

   Ok thank you very much its working fine

 Can i have your mai id?i am new to watir if i come across any queries i
 can ask u?

   On Thu, Mar 19, 2009 at 5:25 PM, wesley chen cjq@gmail.comwrote:

 Sorry, should be clearSelection
 Thanks.
 Wesley Chen.



 On Thu, Mar 19, 2009 at 7:52 PM, nagmani vm nagman...@gmail.comwrote:

 This code is not working am getting error like this:
  undefined method `clear' for #Watir::SelectList:0x415b4f0
 (NoMethodError)

   On Thu, Mar 19, 2009 at 5:16 PM, wesley chen cjq@gmail.comwrote:

 Will you try:
 ie.select_list(:name,inspectionStatus).clear
 ie.select_list(:name,inspectionStatus).set(Partial)


 Thanks.
 Wesley Chen.



 On Thu, Mar 19, 2009 at 7:34 PM, Shweta nagman...@gmail.com wrote:


 Hi

 I have a selection box in my application and its having scroll down
 option with this by default one item will be selectd in that,manually
 if i am selecting other item the default one will be deselcted and
 recent one will get selected but when i am running a script in watir
 it behaves as control i mean its selecting both the default one and
 selected one i have written code like this:

 ie.select_list(:name,inspectionStatus).set(Partial)

 the default one will be All from the list box

 when i am running this line of code i should be able to get only
 partial status inspections/records but am getting both types of
 records.What might be the problem?

 Can anyone pls let me know?








 --
  Thanks  Regards,
  Nagmani V.M.







 --
 Thanks  Regards,
  Nagmani V.M.

 


--~--~-~--~~~---~--~~
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: Multiple Attributes for Input Elements

2009-03-23 Thread Wesley Chen
How many text fields are on the www.google.com page?
I think :index =2 should be after :name =q
Thanks.
Wesley Chen.


On Mon, Mar 23, 2009 at 1:20 PM, Isabel joybe...@gmail.com wrote:


 Hi,
 I tried to use the code below to set a value in the text box of the
 google search page.

 require 'watir'
 ie=Watir::IE.new
 ie.goto http://google.com/;
 ie.text_field(:index = 2 , :name = q).set(xyz)

 But I receive an error which is:

 ruby testmultiAttri.rb
 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
 `assert_exists': Unable to locate element, using
 {:index=2, :name=q} (Watir::Exception::UnknownObjectException)
from
 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
 284:in `enabled?'
from
 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
 56:in `assert_enabled'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 input_elements.rb:323:in `set'
from testmultiAttri.rb:4
 Exit code: 1

 Please do let me know where I am going wrong.
 The text box gets identified correctly if I use any one of the two
 attributes.

 Thanks and Regards.



 On Feb 7, 9:51 pm, Charley Baker charley.ba...@gmail.com wrote:
  Multiple attributes for input elements are now supported in the latest
  version of Watir - 1.6.2. The wiki has also been updated.
 
  Charley Baker
  blog:http://charleybakersblog.blogspot.com/
  Lead Developer, Watir,http://wtr.rubyforge.org
  QA Architect, Gap Inc Direct
 
  On Fri, Feb 6, 2009 at 11:20 PM, Vens venugopal.devarako...@gmail.com
 wrote:
 
 
 
 
 
 
 
   Hi:
 
   I just started using Watir for automating few web UIs. During this I
   came across a situation where I had to put in data to a text field but
   incidently there are 2 text boxes having the same name. Please look at
   the snippet below:
 
   div class=boxed
   h3 class=title Authorize NG IDs /h3
form action=ser.do method=post name=sAFrm
 input type=hidden value=authorize name=dispatch/
 table
tbody
  tr
  td colspan=2div class=infomark You can enter comma
   separated multiple ngids /div/td
  /tr
  tr
th MID /th
td select size=1 name=mid/select/td
 /tr
  tr
th NG IDs /th
 tdinput type=text value= size=100
   maxlength=200
   name=ngids//td
 /tr
   /tbody
   /table
   /form
   /div
 
   div class=boxed
   h3 class=title Authorize NG IDs /h3
form action=ser.do method=post name=sAFrm
 input type=hidden value=unauthorize name=dispatch/
 table
tbody
  tr
  td colspan=2div class=infomark You can enter comma
   separated multiple ngids /div/td
  /tr
  tr
th MID /th
td select size=1 name=mid/select/td
  /tr
  tr
th NG IDs /th
 tdinput type=text value= size=100
   maxlength=200
   name=ngids//td
 /tr
   /tbody
   /table
   /form
   /div
 
   When I looked into
  http://wiki.openqa.org/display/WTR/Multiple+Attributesit
   said it is not implemented for input elements.  Can you help me solve
   this.
 
   Regards
   Venu
 


--~--~-~--~~~---~--~~
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: Synchronization Points

2009-03-24 Thread Wesley Chen
Suppose there are two browsers, one is ie1, another is ie2, the separate
browser.
You may achieve it by:
ie2.do_something
ie2.close
ie1.refresh
ie1.wait
ie1.do_something.


Thanks.
Wesley Chen.


2009/3/24 Darin Duphorn dduph...@redbrickhealth.com


 Brett,

 Within this synchronization, is there a way to handle issues where the
 page doesn't fully load?  (insert a page refresh after a certain time?)

 We have a situation where if a separate browser maybe opened in IE 7.0
 and the automation is running on the an active browser the page doesn't
 fully load and the automation hangs.  We have to click refresh the page
 and then the automation continues.

 When I run a full regression, I do close all browsers before starting,
 and I don't run it the issue, but when we build the test it can be a
 pain.


 Thanks,

 Darin



 -Original Message-
 From: watir-general@googlegroups.com
 [mailto:watir-gene...@googlegroups.com] On Behalf Of Bret Pettichord
 Sent: Tuesday, March 24, 2009 10:04 AM
 To: watir-general@googlegroups.com
 Subject: [wtr-general] Re: Synchronization Points


 Watir has built in synchronization. Most Watir methods will not return
 until the page has finished loading. This is invisible and automatic and

 handles 95% of the synchronization needs of Web Apps.

 When Watir was first released, there were browser drivers in several
 different languages. The most popular was Samie, in Perl. But Watir was
 the first to include this automatic synchronization mechanism. I suspect

 that this was key to its success. Because it is invisible and automatic,

 most people don't give it much thought.

 A little history lesson for you.

 Bret


 vladimir...@hotmail.com wrote:
  In comercial tools, like QuickTest Pro, there are API for
  synchronization points.
  You may wait for a certain time while the page is downloded before
  performing any operations on it.
  The API ranges from simple wait() to more sophisticated functions
  waiting for specific object properties.
 
  Do we have analogs for synchronization points in Watir?
  Do we need to create a loop checking if the web page contains some
  text to guarantee it downloaded?
 
  So far I did not insert any synchronization points in the scripts and
  everything worked fine.
  
 


 --
 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: Austin March 25-26, 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: assert and rescue question

2009-03-24 Thread Wesley Chen
begin
rescue =e
puts e.message
puts e.backtrace
end
Thanks.
Wesley Chen.


On Wed, Mar 25, 2009 at 4:04 AM, watirRookie ukj...@hotmail.com wrote:


 hello,
 I am fairly new to watir and ruby in general. I am trying to automate
 some web testing that requires to check for the existing of certain
 html elements. So I am using the following code in my def:

 #
 def validate_header_login_page
  begin
assert($ie.div(:id, header).exists?)
  puts ( header Test Passed)
rescue = e
  puts( header Test Failed + \t\t + e.message)
  end #begin
 end #def
 #

 The problem I am having is that if a certain element does not exist or
 if I am doing negative test such as:
 assert($ie.div(:id, headerxyz).exists?)

 the header test puts the failing comment but I don't get the metrics
 correct in the end.
 3 tests, 5 assertions, 0 failures, 0 errors

 Does anyone know how to put the failing comment and also increment the
 fail metrics so it looks like:
 3 tests, 5 assertions, 1 failures, 0 errors

 Thanks,
 uj

 


--~--~-~--~~~---~--~~
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: Git and Github on Mac

2009-03-28 Thread Wesley Chen
Thank you very much, Zeljko.

Thanks.
Wesley Chen.


On Sun, Mar 29, 2009 at 4:40 AM, Charley Baker charley.ba...@gmail.comwrote:

 I liked it a lot, read it this morning. It's a great intro to how to
 contribute to Watir or any github project from scratch. :)

 -c


 On Sat, Mar 28, 2009 at 2:18 PM, Željko Filipin
 zeljko.fili...@wa-research.ch wrote:

 I do not usually announce my blog posts here, but I have blogged how to
 contribute code to Watir. I have lost two Friday nights fighting with Git
 and Github to make one line change to Watir code and push it to Github.
 Maybe what I have learned will help future contributors in not making the
 same mistakes. The post has a lot of images and examples what to do, and
 what not to do.

 http://zeljkofilipin.com/2009/03/28/git-and-github-on-mac/

 Let me know if I you like it, or do not like it.

 Željko
 --
 Lead Loudmouth, Watir, watir.com




 


--~--~-~--~~~---~--~~
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 change a ruby file into an .exe file

2009-04-01 Thread Wesley Chen
Hi, Jarmo,
Thank you very much, it is really useful.

Thanks.
Wesley Chen.


On Wed, Apr 1, 2009 at 3:34 PM, Jarmo Pertman jarm...@gmail.com wrote:

 require 'rubyscript2exe'
 require RUBYSCRIPT2EXE.exedir + '/something'


--~--~-~--~~~---~--~~
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 connect SQL server 2005 in Ruby when the DB name is as 172.11.22.5\thesql?

2009-04-02 Thread Wesley Chen
Hi, guys,
I meet a problem to connect to the SQL 2005 in ruby.

1. On local, there is a SQL 2005 server, it is:
*Server name:* 192.168.132.157
*User:* Wesley
*Password:* 11
I can connect it successfully by:
*db=SqlServer.new('192.168.132.157', 'Wesley', '11')*

But on INT server, it is SQL 2005 with:
*Server name:* 172.11.22.5\thesql
*User:* Wesley
*Password:* abc?de
I can't connect it successfully by:
*db=SqlServer.new('172.11.22.5\thesql', 'Wesley', 'abc?de')*
or
*db=SqlServer.new('172.11.22.5\\thesql', 'Wesley', 'abc?de')*


Really appreciated to any help and suggestion.

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: How do you find find frames.

2009-04-02 Thread Wesley Chen
You may try:
ff.show_frames

Thanks.
Wesley Chen.


On Thu, Apr 2, 2009 at 10:44 PM, jason jason.franklin.sto...@gmail.comwrote:



 I have looked and looked through the docs and I simply cannot find an
 answer to this.

 after calling

 doc = firefox.goto(some_url)

 I would like know what frames I have on the rendered page, i.e.

 frames = doc.frames  #of cource this does not work, but I would expect
 an array of frame objects with their attributes returned.

 how do I do this?

 The only thing I found is doc.show_frames which is not exactly what I
 need.

 Thanks for any help on this.



 


--~--~-~--~~~---~--~~
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 know if the checkbox is checked or not?

2009-04-02 Thread Wesley Chen
You may try
ie.checkbox( ).isSet?

Thanks.
Wesley Chen.


On Fri, Apr 3, 2009 at 1:03 AM, satish spanchumar...@gmail.com wrote:


 I have a checkbox, I have to perform check every time whether it is
 checked or not.
 Can some one help me with code.

 Thank you,
 Satish.

 


--~--~-~--~~~---~--~~
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] Can I get the content in the boolean left and right value??

2009-04-07 Thread Wesley Chen
Hi, All,
Suppose I would like to write a method like.

def test(boolean, message)
   if boolean
   puts message
   else
   puts boolean.left_value
   puts boolean.right_value
   end
end

Sometimes, I have to invoke the methods like:
test(arra.include?(arrb), arra includes arrb)

test(arra.eql?(arrb), arra equals to arrb)

When the boolean is not true, I would like to get the info why they don't
match/equal/include.


Any suggestion would be quite appreciated.

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: How to calculate time difference?

2009-04-08 Thread Wesley Chen
require 'time'
def time_difference(start_time, end_time)
start_time = Time.parse(start_time)
end_time   = Time.parse(end_time)
total_time = end_time -  start_time
time=Time.local(00:00:00) + total_time
return time.to_s.match(/\d{2}:\d{2}:\d{2}/).to_s
end

puts time_difference(12:23:24, 17:23:22)


Thanks.
Wesley Chen.


On Wed, Apr 8, 2009 at 8:19 PM, Prince3105 prince3...@gmail.com wrote:

 start_time = Time.parse(start_time)
  end_time   = Time.parse(end_time)
   total_time = end_time -  start_time


--~--~-~--~~~---~--~~
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: Can I get the content in the boolean left and right value??

2009-04-08 Thread Wesley Chen
Hi, Chuck,
:), to be honest, in my current code, I have the same approach as you have
used before.
In the approach, I can abandon the verify or assert completely. I think it
is not good enough.

Maybe I have to spend some time on Watircraft. Maybe I can make my frame
easier, :).


Thanks.
Wesley Chen.


On Thu, Apr 9, 2009 at 3:35 AM, Chuck van der Linden sqa...@gmail.comwrote:

 e first failure (it means th

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

2009-04-08 Thread Wesley Chen
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: What gems to do you have installed?

2009-04-11 Thread Wesley Chen
I have installed a lot, but I don't know which I must install.
actionmailer (2.2.2)
actionpack (2.2.2)
activerecord (2.2.2)
activeresource (2.2.2)
activesupport (2.2.2)
archive-tar-minitar (0.5.2)
bret-watircraft (0.4.5)
builder (2.1.2)
color (1.4.0)
commonwatir (1.6.2)
cucumber (0.2.3)
diff-lcs (1.1.2)
firewatir (1.6.2)
fxri (0.3.7)
fxruby (1.6.16)
hoe (1.8.0)
hpricot (0.6)
io-reactor (1.0.4)
jruby-openssl (0.3)
linecache (0.43)
log4r (1.0.5)
mocha (0.9.5)
ParseTree (2.1.1)
pdf-toolkit (0.49)
pdf-writer (1.1.8)
polyglot (0.2.5)
ptools (1.1.6)
rails (2.2.2)
rake (0.8.3)
rspec (1.2.2)
rubigen (1.5.2)
ruby-debug-base (0.10.2)
ruby-debug-ide (0.3.1)
ruby-hl7 (0.3)
Ruby-IRC (1.0.12)
Ruby-MemCache (0.0.1)
ruby-msg (1.4.0)
ruby-net-ldap (0.0.4)
ruby-net-nntp (1.0.0)
ruby-ole (1.2.8)
ruby-web (1.1.1)
ruby-xquery (0.1.1.270)
ruby-yadis (0.3.4)
ruby2jar (0.1)
ruby2ruby (1.1.9)
Ruby4Skype (0.2.2)
ruby_extensions (1.0.14)
rubyforge (1.0.3, 1.0.1)
rubygems-update (1.3.1)
RubyInline (3.7.0)
RubyInlineAcceleration (0.0.1)
rubyscript2exe (0.5.3)
s4t-utils (1.0.4)
sources (0.0.1)
sys-admin (1.4.3)
sys-cpu (0.6.0)
sys-filesystem (0.1.1)
sys-host (0.6.0)
sys-proctable (0.7.6)
sys-uname (0.8.3)
sys-uptime (0.5.1)
systemu (1.2.0)
taglob (1.1.2)
term-ansicolor (1.0.3)
test-unit (2.0.0)
tmail (1.2.3.1)
transaction-simple (1.4.0)
treetop (1.2.5)
user-choices (1.1.6)
vpim (0.658)
watir (1.6.2)
win32-api (1.2.0)
win32-clipboard (0.4.4)
win32-dir (0.3.2)
win32-eventlog (0.5.0)
win32-file (0.5.6)
win32-file-stat (1.3.2)
win32-process (0.5.9)
win32-sapi (0.1.4)
win32-sound (0.4.1)
windows-api (0.2.4)
windows-pr (0.9.4)
wxruby (1.9.9)
xml-simple (1.0.11)


Thanks.
Wesley Chen.


On Sat, Apr 11, 2009 at 8:40 AM, George george.sand...@gmail.com wrote:


 actionmailer (2.3.2)
 actionpack (2.3.2)
 activerecord (2.3.2)
 activeresource (2.3.2)
 activesupport (2.3.2, 2.2.2)
 bret-watircraft (0.4.3)
 builder (2.1.2)
 chrome_watir (1.4.0)
 ci_reporter (1.5.2)
 commonwatir (1.6.2)
 cucumber (0.2.3, 0.2.2, 0.1.16)
 dbi (0.4.1)
 deprecated (2.0.1)
 diff-lcs (1.1.2)
 firewatir (1.6.2)
 fxri (0.3.7, 0.3.6)
 fxruby (1.6.19, 1.6.18, 1.6.12)
 hoe (1.12.1, 1.11.0, 1.10.0, 1.9.0, 1.8.3)
 hpricot (0.8, 0.7, 0.6.164, 0.6)
 log4r (1.0.5)
 mocha (0.9.5)
 nokogiri (1.2.3)
 polyglot (0.2.5)
 ptools (1.1.6)
 rack (0.9.1)
 rails (2.3.2)
 rake (0.8.4, 0.8.3, 0.7.3)
 rasta (0.1.9)
 rspec (1.2.2, 1.1.12)
 rspec-rails (1.2.2)
 rubigen (1.5.2)
 rubyforge (1.0.3, 1.0.2)
 rubyscript2exe (0.5.3)
 s4t-utils (1.0.4)
 sources (0.0.1)
 taglob (1.1.2)
 term-ansicolor (1.0.3)
 test-unit (2.0.2)
 treetop (1.2.5)
 user-choices (1.1.6)
 watir (1.6.2)
 webrat (0.4.3)
 win32-api (1.4.0, 1.3.0, 1.0.4)
 win32-clipboard (0.4.4, 0.4.3)
 win32-dir (0.3.3, 0.3.2)
 win32-eventlog (0.5.0, 0.4.6)
 win32-file (0.6.1, 0.6.0, 0.5.4)
 win32-file-stat (1.3.3, 1.3.2, 1.2.7)
 win32-process (0.6.0, 0.5.3)
 win32-sapi (0.1.4)
 win32-sound (0.4.1)
 win32console (1.2.0)
 windows-api (0.3.0, 0.2.0)
 windows-pr (1.0.2, 1.0.1, 1.0.0, 0.7.2)
 xml-simple (1.0.12, 1.0.11)

 


--~--~-~--~~~---~--~~
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: Controlling JavaScript Pop Ups without .click_no_wait

2009-04-20 Thread Wesley Chen
I have met a problem.
There is a checkbox, when I click it, it pops up a dialog with OK button
on it.
How can I click the OK button on it?

Is there any set_no_wait method and then click OK?

Any suggestion would be quite appreciated.

Thanks.
Wesley Chen.


On Tue, Feb 17, 2009 at 1:51 AM, Bret Pettichord b...@pettichord.comwrote:


 Bill Mosteller wrote:
  Thanks.  Just tried onClick, and it doesn't work either.
 
  From the Ruby PickAxe book:
 
  And if some thread happens to make a call to the operating system
  that takes a long time to complete, all threads will hang until the
  interpreter gets control back.
 
 Exactly. Which is why threading alone isn't helpful when working with
 IE. If you are blocked, you need to spawn a process.


 


--~--~-~--~~~---~--~~
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: Controlling JavaScript Pop Ups without .click_no_wait

2009-04-20 Thread Wesley Chen
Thanks, I make few changes and get it down. :)
Now, we can use click_no_wait, select_no_wait, set_no_wait.

module Watir
class Element

#select_no_wait - selects a drop-down element spawning a new
process.
#this is needed to close potential pop-ups that select drop-down can
trigger.
def set_no_wait
assert_enabled
highlight(:set)
object = #{self.class}.new(self, :unique_number,
#{self.unique_number})
@page_container.eval_in_spawned_process(object + .set)
highlight(:clear)
end
end
end

--~--~-~--~~~---~--~~
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] Unexpected error when Run the code in Netbeans.

2009-04-21 Thread Wesley Chen
I don't know whether you guys have ever met this kind of problem in
Netbeans.

1. Create a *new project* in Netbeans;
2. Create a .rb file, named *thread.rb,* in the file, only two words:
require 'watir'
puts OK
3. Run it, you will get error message:
F:\Watir project\My Test\lib/thread.rb:1:in `require': no such file to load
-- watir (LoadError)

from F:\Watir project\My Test\lib/thread.rb:1

from e:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:10:in `require'

from e:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:10

from e:/ruby/lib/ruby/site_ruby/1.8/ubygems.rb:10:in `require'

from e:/ruby/lib/ruby/site_ruby/1.8/ubygems.rb:10
4. in the thread.rb file, add another comment:
puts OK
5. Run it, you will get error message:
e:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:176: uninitialized constant
Gem::Mutex (NameError)

from e:/ruby/lib/ruby/site_ruby/1.8/ubygems.rb:10:in `require'

from e:/ruby/lib/ruby/site_ruby/1.8/ubygems.rb:10

6. Then, all the ruby code in the *netbeans project* you have created will
crash when you run it.

I met this kind of problem and search for a long time, I can't get why I get
this kind of error.
When I change the file name of thread.rb to other.rb, anything comes back.
Really weird.

Expect some experts can give me a hand, why it turns up.


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: Unexpected error when Run the code in Netbeans.

2009-04-21 Thread Wesley Chen
I have used netbeans for a long time, of course I know the environment
deployment of it, :)
Thanks.
Wesley Chen.


On Wed, Apr 22, 2009 at 12:13 AM, Jim Matthews jim_m...@swbell.net wrote:


 Wesley,

 Have you set the run environment to use your externally installed
 Ruby instead of JRuby?

 Watir will not run under JRuby.

 Go to Tools - Ruby Platforms - and add your externally installed
 Ruby platform.  Then on each of your projects, you have to make sure
 that your project references this run environment.

 Jim


 On Apr 21, 10:11 am, Wesley Chen cjq@gmail.com wrote:
  I have not reported yet.
  When I run the code out of netbeans, it is OK.
 
  Thanks.
  Wesley Chen.
 
  On Tue, Apr 21, 2009 at 11:03 PM, Željko Filipin
 
  zeljko.fili...@wa-research.ch wrote:
   On Tue, Apr 21, 2009 at 16:43, Wesley Chen cjq@gmail.com wrote:
I met this kind of problem and search for a long time, I can't get
 why I
   get this kind of error.
 
   Did you report it to netbeans?
 
   Željko
   --
  http://watirpodcast.com/
 


--~--~-~--~~~---~--~~
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: What editor should I use for mac?

2009-04-22 Thread Wesley Chen
I use Windows XP system.
When I have the ruby plugin in my Eclipse 3.4, then run my Watir code, messy
code would turn up when I have the multiple-line comment.
I don't know whether you guys have ever met this kind of problem, please
follow my steps as below:
Write your watir code
your code 1
your code 2
in your eclipse ruby project;
Add multiple-line comment
=begin
your code 1
your code 2
=end

Sometimes, the mess code turns up.

So, I turn to use Netbeans, as long as now, anything looks good.

Thanks.
Wesley Chen.


On Thu, Apr 23, 2009 at 2:18 AM, Lisa Crispin lisa.cris...@gmail.comwrote:

 I have Eclipse 3.4.1 and it kind of seems like it came with the Ruby
 plug-in, but as our sys admin installed it for me (I'm challenged at setting
 up Eclipse correctly) maybe he installed the plug-in too. Anyway, works fine
 for me.
 -- Lisa

 On Wed, Apr 22, 2009 at 9:42 AM, Jeff Fry jeff@gmail.com wrote:

 There isn't a separate ruby version of Eclipse, though you'll want to
 install the ruby plug-in. See the Watir wiki page on Eclipse:
 http://wiki.openqa.org/display/WTR/Setting+up+Eclipse+for+Ruby

 On Wed, Apr 22, 2009 at 8:32 AM, Hassan Malik hassanm_...@yahoo.comwrote:

 I am curently SciTe on windows and wold like to try Eclipse. Does it
 matter what version I use? They have Eclipse IDE for Java, C/C++, but I
 don't see one for ruby. http://www.eclipse.org/downloads/



  --
 *From:* Lisa Crispin lisa.cris...@gmail.com
 *To:* watir-general@googlegroups.com
 *Sent:* Tuesday, April 21, 2009 5:26:31 PM
 *Subject:* [wtr-general] Re: What editor should I use for mac?

 I confess I don't use Watir much on my mac yet - it's on my list to
 someday get the scripts running in Firewatir. But I just use Eclipse to edit
 my Watir scripts on either box. Works well.
 -- Lisa

 On Tue, Apr 21, 2009 at 3:14 PM, Moochie dduph...@redbrickhealth.comwrote:


 I was just give a mac and I've attempted to get watir working on it,
 but it said I couldn't save a file as .rb I could only save it
 as .rtb.

 Also, should I install ubuntu?




 --
 Lisa Crispin
 Co-author with Janet Gregory, _Agile Testing: A Practical Guide for
 Testers and Agile Teams_ (Addison-Wesley 2009)
 http://lisacrispin.com







 --
 Jeff Fry

 http://testingjeff.wordpress.com
 http://associationforsoftwaretesting.org





 --
 Lisa Crispin
 Co-author with Janet Gregory, _Agile Testing: A Practical Guide for Testers
 and Agile Teams_ (Addison-Wesley 2009)
 http://lisacrispin.com


 


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

2009-04-25 Thread Wesley Chen
Hi, Bret,
I would like to ask you a question.
Watir has been a popular web automation testing tool now, so many companies
and testers have benefited from it, in fact, they benefited from your share
and creativity.
What's your next step for it? Improve the stable, recommend it more?
Some people said that, Watir maybe a potential tool for performance testing,
would you work on it, make Watir fit for performance testing or create
another Frame in Ruby for performance testing?

Thanks.
Wesley Chen.


On Sat, Apr 25, 2009 at 1:55 AM, Bret Pettichord b...@pettichord.comwrote:


 Some notes on my original vision behind Watir:
 http://www.io.com/~wazmo/blog/archives/2009_04.html#000293http://www.io.com/%7Ewazmo/blog/archives/2009_04.html#000293

 I'm thinking of writing more about this. If you would like to read more,
 please send questions. You can post them on the blog, or here, or send
 me private emails or twitter replies. Whatever works for you.

 Bret

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

 Ask me about Watir training
 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: thinking about automation frameworks/harnesses

2009-04-27 Thread Wesley Chen
That maybe a frame, but I think it is not housed well enough.

Thanks.
Wesley Chen.


On Tue, Apr 28, 2009 at 12:33 AM, Chris christopher.mcma...@gmail.comwrote:

 ate it if you let me know.


--~--~-~--~~~---~--~~
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 use the Watir::SelectList methods?

2009-04-27 Thread Wesley Chen
Hey, guys,
How to use the select list methods on page:
http://wtr.rubyforge.org/rdoc/classes/Watir/SelectList.html

Any limitations to use the great methods?

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] How to merge self.method into another module?

2009-04-28 Thread Wesley Chen
Hi, guys,
If I have two modules, there is one method in each of it:
module Test1
def self.hello1
end
end
module Test2
def self.hello2
end
end

Can I make the method *hello1 *as a method of module Test2?
So that, I can use *Test2.hello1* ?

Any suggestion would be quite appreciated.

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



  1   2   3   >