[wtr-general] Name of the currently running methods

2009-04-07 Thread Vikas Tulashyam
Hi, Can I get the name of the currently running methods with the class and package name. like-- class A def method() puts nameofThecurrentMethod end end let suppose there is a method nameofThecurrentMethod which prints the name of the currently running method. Is it possible in Watir?

[wtr-general] Re: How to Drag and Drop a DIV element in Watir

2009-04-07 Thread al3kc
try to check out this one http://feedraider.com/item/24826/Z-Bar-Zone/Drag-and-Drop-with-Watir/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to

[wtr-general] Re: How to Drag and Drop a DIV element in Watir

2009-04-07 Thread al3kc
try to check out this one http://feedraider.com/item/24826/Z-Bar-Zone/Drag-and-Drop-with-Watir/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to

[wtr-general] Failing to update gem

2009-04-07 Thread spike
Hi I'm trying to update gem using the command gem update but its failing to update and i'm getting following error. ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError) ERROR: Failed to build gem native extension. rake

[wtr-general] Re: uninitialized constant Windows::API::Error (NameError)

2009-04-07 Thread frank.li
This issue is windows-pr version resolution: Gem uninstall windows-pr Gem install windows-pr answer from http://www.zhuaijun.cn/archives/53 On 3月30日, 下午11时22分, Dennis I. ideler.den...@gmail.com wrote: I tried installing Watir at home a while ago and kept getting an error. I followed some

[wtr-general] Re: Failing to update gem

2009-04-07 Thread JArkelen
If you want to do a general update on all your gems, use gem update -- system If you want to update a specific gem use gem update gem name Cheers, John On Apr 7, 9:24 am, spike vinaykumarl...@gmail.com wrote: Hi I'm trying to update gem using the command gem update but its failing to

[wtr-general] Re: SelectList behaves differently with 1.6.2?

2009-04-07 Thread Jarmo Pertman
As I've stated already on my previous post, I already diffed wait method and only difference was one additional rescue NoMethodError. But my problem is not related with that fix, because I'm not receiving any NoMethodErrors. I still guess that the logic may be behind the fact that 1.6.2 is

[wtr-general] Re: How to know if the checkbox is checked or not?

2009-04-07 Thread Jarmo Pertman
Why are you making it to string and comparing with string representation of TrueClass? You also had only one '=', which makes your if to be always true. Correct would be of course if $ie.checkbox(:name,blah).checked? == true end On Apr 3, 4:00 pm, Darin Duphorn dduph...@redbrickhealth.com

[wtr-general] Problem with popup window

2009-04-07 Thread spike
Hi I'm using the following code for a popup window, ie.button(:text, Reset).click_no_wait hwnd = ie.enabled_popup(5) if (hwnd) #yeah! a popup popup = WinClicker.new popup.makeWindowActive(hwnd) popup.clickWindowsButton(Windows Internet Explorer, OK, 30) end but i'm getting the

[wtr-general] Re: Failing to update gem

2009-04-07 Thread spike
when i'm using gem update --system it says nothing to update, On Apr 7, 1:22 pm, JArkelen johnvanarke...@gmail.com wrote: If you want to do a general update on all your gems, use gem update -- system If you want to update a specific gem use gem update gem name Cheers, John On Apr 7, 9:24 

[wtr-general] Re: Basic Watir Help

2009-04-07 Thread Željko Filipin
On Tue, Apr 7, 2009 at 12:13, catepillar cmay...@gmail.com wrote: div div4/2/div div97/div div95/div div100/div /div Also, new questions in new threads. :) Something like this: date = ff.div(:index, 1).text Read this and your eyes will open:

[wtr-general] Re: Problem with popup window

2009-04-07 Thread spike
its not working for me please me some other solution. On Apr 7, 2:22 pm, GJHmf graham.harb...@googlemail.com wrote: Edit:  These two lines should have been pasted into the WinClicker example, not the AutoIt example: require 'watir/ie' require 'watir/contrib/enabled_popup'

[wtr-general] Re: Basic Watir Help

2009-04-07 Thread Željko Filipin
On Tue, Apr 7, 2009 at 11:58, catepillar cmay...@gmail.com wrote: div id=date title=Date4/2/div date = ff.text_field(:id, date) but that returns an error: Unable to locate element, using :id, date (Watir::Exception::UnknownObjectException) You need to access div, not text field. Try this:

[wtr-general] Re: Basic Watir Help

2009-04-07 Thread catepillar
Wow, thank you very much! On Apr 7, 5:03 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Tue, Apr 7, 2009 at 11:58, catepillar cmay...@gmail.com wrote: div id=date title=Date4/2/div date = ff.text_field(:id, date) but that returns an error: Unable to locate element, using :id,

[wtr-general] Re: Problem with popup window

2009-04-07 Thread GJHmf
Spike, you beat my post by mere minutes; as it seems I'm having exactly the same issue as you. After much searching on the group and other sources, I had two different approaches to this (below); one using WinClicker, the other using calls to AutoIt. Both methods worked *sometimes* yesterday,

[wtr-general] Re: Problem with popup window

2009-04-07 Thread GJHmf
its not working for me please me some other solution. My reply wasn't a solution; I was merely adding in my own own examples for our mutual problem with popups. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[wtr-general] Organization and execution of test cases.

2009-04-07 Thread James
Hi all. I'm just getting into watir and so far enjoying the ride! I'm wondering though, what are people using to organize and execute their test cases? Are you just writing it all custom in ruby, or is there any sort of framework/application/gem that people are using to organize and run their

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread satish
Any help on this is greatly appreciated. Thank you Satish On Apr 6, 8:42 pm, satish spanchumar...@gmail.com wrote: Its actually just text not a link. My table  has columns 'Agency', City, State. Each row will have data populated. I will have to select a row based on the 'Agency' I want,

[wtr-general] Re: Basic Watir Help

2009-04-07 Thread catepillar
Hahaha. Will do. This is just a random question, but what would you do if there were no id tag. So the code looked something like: div div4/2/div div97/div div95/div div100/div /div Now there is nothing to set them apart, but I would still need to set them to individual variables. On Apr 7,

[wtr-general] Re: Problem with popup window

2009-04-07 Thread GJHmf
Edit: These two lines should have been pasted into the WinClicker example, not the AutoIt example: require 'watir/ie' require 'watir/contrib/enabled_popup' --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir

[wtr-general] Re: Organization and execution of test cases.

2009-04-07 Thread Željko Filipin
On Tue, Apr 7, 2009 at 14:41, James jgcpal...@gmail.com wrote: is there any sort of framework/application/gem http://github.com/bret/watircraft/tree/master Željko --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[wtr-general] Re: Organization and execution of test cases.

2009-04-07 Thread JArkelen
In most cases I use Rake to execute mulitple tests. On Apr 7, 2:58 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Tue, Apr 7, 2009 at 14:41, James jgcpal...@gmail.com wrote: is there any sort of framework/application/gem http://github.com/bret/watircraft/tree/master Željko

[wtr-general] Re: IE out of memory error (buffer overflow)

2009-04-07 Thread IDIEININIIS
The page is using js, that could be it. I found a tool called JSLeak Detector (from MS). The page it's on explains how memory leaks are created in IE; it's an interesting read. If anyone else is interested: http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector.aspx I'll download it

[wtr-general] Re: uninitialized constant Windows::API::Error (NameError)

2009-04-07 Thread satish
That is correct. I ran into same issue and got it resolved with same command. On Apr 7, 4:13 am, frank.li lizhiguoem...@gmail.com wrote: This issue is windows-pr version resolution: Gem uninstall windows-pr Gem install windows-pr answer from http://www.zhuaijun.cn/archives/53 On 3月30日,

[wtr-general] Re: Failing to update gem

2009-04-07 Thread Bret Pettichord
Which gem are you trying to update? Are you trying to update the gem system? The command for that is gem update --system. Bret spike wrote: Hi I'm trying to update gem using the command gem update but its failing to update and i'm getting following error. ERROR: While executing gem

[wtr-general] Re: How to know if the checkbox is checked or not?

2009-04-07 Thread Bret Pettichord
Jarmo Pertman wrote: Correct would be of course if $ie.checkbox(:name,blah).checked? == true end Even better: if $ie.checkbox(:name,blah).checked? end -- Bret Pettichord CTO, WatirCraft LLC, www.watircraft.com Lead Developer, Watir, www.watir.com Blog, www.io.com/~wazmo/blog

[wtr-general] Re: IE out of memory error (buffer overflow)

2009-04-07 Thread Dennis I.
Just an update: I figured I had the following three options. 1. Close IE and then reopen where I left off, after a set amount of iterations. Most likely a few times to be safe. 2. Use Firefox 3. Disable JS (as long as it doesn't affect the relevant data). I tried option 2 at first. It seemed

[wtr-general] Re: Is there a Watir Recorder similar to Selenium IDE

2009-04-07 Thread Chuck van der Linden
try searching the group for the word 'recorder' you'll find some threads that should answer your question. note that as far as I know, none of the recorder projects is very active, and none have been updated to support the current version of Watir. On Apr 7, 8:23 am, Tester78

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread Chuck van der Linden
There's probably some kind of javascript event being triggered You'll likely need to look at the source to figure out what element it's attached to, figure out how to identify that element, and if the element type doesn't support a click method you'll have to try firing javascript events at it

[wtr-general] Re: Failing to update gem

2009-04-07 Thread Chuck van der Linden
generally speaking, if it says 'nothing to update' then it's updated. On Apr 7, 2:08 am, spike vinaykumarl...@gmail.com wrote: when i'm using gem update --system it says nothing to update, On Apr 7, 1:22 pm, JArkelen johnvanarke...@gmail.com wrote: If you want to do a general update on

[wtr-general] Re: Basic Watir Help

2009-04-07 Thread Chuck van der Linden
On Apr 7, 3:13 am, catepillar cmay...@gmail.com wrote: Hahaha.  Will do. This is just a random question, but what would you do if there were no id tag. So the code looked something like: div div4/2/div div97/div div95/div div100/div /div Now there is nothing to set them apart, but I

[wtr-general] Re: IE out of memory error (buffer overflow)

2009-04-07 Thread Bret Pettichord
If you want to close and reopen IE, I suggest you use IE.new_process instead of IE.new. This is more reliable and will ensure that the process terminates. Dennis I. wrote: Just an update: I figured I had the following three options. 1. Close IE and then reopen where I left off, after a

[wtr-general] Re: Organization and execution of test cases.

2009-04-07 Thread James
Thanks! Is there any documentation available for this anywhere? What's on that site is pretty slim, and there's some questions I don't have answers for (for instance, I can see how to configure it for different environments, but how do I choose which environment I run in?) Anyways, I'm

[wtr-general] Re: Organization and execution of test cases.

2009-04-07 Thread Chuck van der Linden
On Apr 7, 6:13 am, JArkelen johnvanarke...@gmail.com wrote: In most cases I use Rake to execute mulitple tests. Which is great advice, but might as well be speaking greek to someone just starting work with Watir and Ruby. If you are a programmer type I can probably tell you Rake is Ruby's

[wtr-general] Re: Organization and execution of test cases.

2009-04-07 Thread Chuck van der Linden
On Apr 7, 5:58 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Tue, Apr 7, 2009 at 14:41, James jgcpal...@gmail.com wrote: is there any sort of framework/application/gem http://github.com/bret/watircraft/tree/master +1 --~--~-~--~~~---~--~~ You

[wtr-general] Re: Organization and execution of test cases.

2009-04-07 Thread Maura van der Linden
The Wiki on that site is being worked on as well, at the moment. Just so you know :) - Maura On Tue, Apr 7, 2009 at 10:02 AM, James jgcpal...@gmail.com wrote: Thanks! Is there any documentation available for this anywhere? What's on that site is pretty slim, and there's some questions I

[wtr-general] WatirCraft Environment config file.

2009-04-07 Thread James
I'm just getting into WatirCraft and finding very little documentation around for it. How do I run my tests in different environments? I can see I can set up different environments in the environment config file, but I don't know how to actually run any environment except for the test

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread SuperKevy
Tiffany has the method. Here's the equivalent as a stupid dog trick Assume a 2 column table the lookup is column 2. Assume there is only 1 table on the page. The action I want is an associated image click in column 1 findUser=Wilmington myTable=ie.table(:index,1) iRows=myTable.row_count()

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread Tiffany Fodor
Hi Satish! This is just a stab in the dark, but is the text you want to click a span rather than a link? This has been the case for me from time to time. If it is the case for you, you should be able to click it like this: browser.span(:text, 'my text).click or more specifically for a div:

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread satish
Hi SuperKevy, I do not have image tags or any tags that I can call, I am struck right there with your code. I am dealing with pure text. Is there any solution for my case? Tiffany solution seems to be working, but that code have mouseover only. Do you know whats the command for left click? is

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread satish
Hi Tiffany, This link has just keyboard commands. Do you know mouse commands? Appreaciate your help. Thank you very much, Satish On Apr 7, 3:18 pm, Tiffany Fodor tcfo...@comcast.net wrote: Here's the list of send key actions: http://www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm

[wtr-general] Re: WatirCraft Environment config file.

2009-04-07 Thread James
Thanks for the quick reply, Bret. I figured how to do different environments. i.e.: rake spec ENVIRONMENT=myenvironmentname If you can get back to me on the other question, about setting up environments in the environments config file and using them in my scripts, that would be excellent.

[wtr-general] Re: Organization and execution of test cases.

2009-04-07 Thread Bret Pettichord
I just posted more documentation. James wrote: Thanks! Is there any documentation available for this anywhere? What's on that site is pretty slim, and there's some questions I don't have answers for (for instance, I can see how to configure it for different environments, but how do I

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread Tiffany Fodor
I found this page with Google: http://www.autohotkey.com/docs/commands/Send.htm Does this work? ie.send_keys('{Click}') It really seems like there should be another event you can fire somewhere. I'd navigate through the IE Dev Toolbar output at the table, row and cell levels looking for it.

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread Tiffany Fodor
Ah - I just looked at your html source and it's not a span. Sorry for the wild guess. Can you get IE Dev Toolbar or Firebug output for the row or element you're trying to select? You can parse through the rows in your table like this: my_table = browser.table(:id, 'table id')

[wtr-general] Re: Organization and execution of test cases.

2009-04-07 Thread Bret Pettichord
Chuck van der Linden wrote: On Apr 7, 6:13 am, JArkelen johnvanarke...@gmail.com wrote: In most cases I use Rake to execute mulitple tests. Which is great advice, but might as well be speaking greek to someone just starting work with Watir and Ruby. If you are a programmer type I

[wtr-general] Re: WatirCraft Environment config file.

2009-04-07 Thread Bret Pettichord
James, Good questions. One way would be set an environment variable called ENVIRONMENT to be the name of the environment you want to test. I think you could also define which environment to test in your config.yml file. Can you set up other variables? You should, but let me check it out and

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread Tiffany Fodor
Here's the list of send key actions: http://www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm to send an Enter: ie.send_keys('{Enter}') I don't think it will work with Firefox, however Does this work? row[1].click #clicking on column 1 of the row, pick any column you like -Tiffany

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread satish
Hi Tiffany, I think your solution is going to work. I have to use left click now to select that text, can you please tell me what is the command for left clicking. is there any reference place for all the commands availabel? Thank you Appreciate your help. Satish On Apr 7, 2:33 pm, Tiffany

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread satish
Thank you Tiffany and SuperKevy, Both solutions are wonderful. Appreciate your help on this. I had to make some changes to work for my schenario. Here is both with changes. # SuperKevy solution.## findUser=Charlotte myTable=ie.table(:id,

[wtr-general] Re: Basic Watir Help

2009-04-07 Thread catepillar
Yea, it is really bad code. And, I have just been told to see if its easy to reverse make a spreadsheet of what has already been made. I do what I am told. There probably wont be any changes to the code, and if there is, I can manage it. The script I am writing really is not all that complex.

[wtr-general] Re: WatirCraft Environment config file.

2009-04-07 Thread Bret Pettichord
James wrote: Also, can I set up different variables in the environment config table? For instance, what if I want one environment to be Site A with Login A, and the other environment to be Site B with Login B? I know how to set the URL for the different environments, but can I set other

[wtr-general] Re: How to click on a table cell based on the text string that I know. Ex:- Wilmington.

2009-04-07 Thread KimBrown
One other way that I figure out how to select a certain cell or button is to use a freeware capture/playback tool called Script Recorder. I'll set it to record and click on what I want and the code will almost always be generated (it doesn't handle java popups). Then I cut it and paste it into

[wtr-general] Re: Is there a Watir Recorder similar to Selenium IDE

2009-04-07 Thread Eileen
Record/Playback is a good way to start to generate tedious test steps (such as a long list of checkboxes in a survey), but do NOT rely on it, otherwise might end up no-supportable test scripts. iTest2/Watir recorder (http://www.itest2.com/downloads) does exactly I want. On Apr 8, 1:23 am,

[wtr-general] Popup for File downlaods

2009-04-07 Thread spike
Hi I'm really confused working with Pop Up's i'm not able to find any solution for it wat ever script i'm trying its not working for me. The following is the script i used for a file downlaod popup prompt_message = Do you want to open or save this file? window_title = File Download save_dialog

[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),

[wtr-general] Re: Can I get the content in the boolean left and right value??

2009-04-07 Thread Anna Gabutero
On Wed, Apr 08, 2009 at 01:10:57PM +0800, Wesley Chen wrote: 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

[wtr-general] Handling popups

2009-04-07 Thread spike
Hi I'm tried to run Popups_test.rb script but its not working im getting the following error C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- unittests/setup (LoadError) from