Re: [Wtr-general] How to deal with the copyrihgt symbol

2007-07-13 Thread Paul Carvalho
Put the actual copyright symbol in this assert line and it should work: assert( $ie.text.include?( (c) ) ) When you use the ie.text method, you don't get the source code, you get back the contents as you see it on the page. Since you see the *symbol* on the page (and not copy;), just put

Re: [Wtr-general] How to deal with the copyrihgt symbol

2007-07-13 Thread Paul Carvalho
On 13/07/07, marekj wrote: This looks like fun with encoding. [snip] Paul suggested to use the actual entity in the assertion. I tried it and it doesn't work for me. I get false. It works for me. I created a ruby script as follows: - # Look for the copyright symbol on a page

Re: [Wtr-general] UnknownObject Exception when running test cases

2007-06-28 Thread Paul Carvalho
If the code below is an actual snippet from your code then could the *order* the tests be the problem? Please remember that the _default_ order of execution is ascending alpha, so the script would likely try to run the tests in the following order regardless of how they are arranged in the

Re: [Wtr-general] Save results to file

2007-06-14 Thread Paul Carvalho
Hey B! Just a few things. First off, there is a more efficient way of opening a file for writing. Try the following instead: textlog = File.open(text.log, w) Secondly, when I run your script, the text.log file is *not* empty. There are in fact 70 blank lines in the output file. That tells

Re: [Wtr-general] Concurrent tests, different regions...

2007-06-06 Thread Paul Carvalho
Without seeing more of the code, I'm pretty sure you need to start by moving away from using Global variables. On 06/06/07, eisdrache [EMAIL PROTECTED] wrote: Here is the basic idea of what I am trying to do... I have one site, lets call it www.example.com. On that site, there is a login

Re: [Wtr-general] Long, strange field name issue

2007-05-22 Thread Paul Carvalho
Did you try it with single-quotes instead of double-quotes? On 22/05/07, Tiffany Fodor [EMAIL PROTECTED] wrote: The line in my script (#126) that writes data to this field looks like this: ie.text_field(:name, Business Income/Extra Expense/Rental Value_0).set(account[bldgBI])

Re: [Wtr-general] How to run all the steps defined in a method even if any of step fails?

2007-04-10 Thread Paul Carvalho
You're repeating yourself, Charley. ;-) This new assertions.rb covers one aspect of what Watir User asked but not the other: Its not only related to assertions .. . That's why I described a general Ruby construct for recovering from methods regardless of what Watir version you're using.

Re: [Wtr-general] How to check presence of link by using begin - until method

2007-03-29 Thread Paul Carvalho
Hello Watir user, I get an error when I try to execute the command ... Perhaps you could include a little more code in your email post? Also, can you please clarify what it is you are trying to do in the web application (i.e. as a user)? What triggers the link to appear? On 29/03/07,

Re: [Wtr-general] hi, Is there a GOTO function for watir

2007-03-28 Thread Paul Carvalho
No. Read this important article : http://en.wikipedia.org/wiki/Spaghetti_code Please rethink how you structure your code. I *highly* recommend taking a course on Programming Concepts and Design if you haven't done any formal structured programming/scripting in a *long* time. GOTO's bad.

Re: [Wtr-general] Testing a development process

2007-03-16 Thread Paul Carvalho
This is a great question and a tough one too. One of my philosophies during my career has always been to make myself replaceable so that I can move onto other more interesting things. In your situation, it sounds like you've accomplished that. You introduced a tool and a desire to move testing

Re: [Wtr-general] Click on button which isn't a button

2007-03-16 Thread Paul Carvalho
Hi Adam, this is the situation we have with our navigation bar for one of our web apps. Using Watir 1.4.1 I couldn't use the 'text' attribute for SPAN tags and none of the Spans had unique ID's. What I ended up doing was creating two methods to help us navigate the system. The first one is

Re: [Wtr-general] Click on button which isn't a button

2007-03-16 Thread Paul Carvalho
Heh. You didn't miss the point. That's why populate_navigation_bar is a method! ;-) Cheers! Paul C. On 16/03/07, Adam Reed [EMAIL PROTECTED] wrote: Thanks for the help Paul. I did have one question about this method, however: As far as putting indexes and the name you want in the Hash

Re: [Wtr-general] How to read all text fields of a page and store it into an array

2007-03-15 Thread Paul Carvalho
What have you tried and where have you looked for the answers? On 15/03/07, sikander [EMAIL PROTECTED] wrote: Hi, I have an array say arrayTextfield1 = [textfield1, textfield2, textfield3, textfield4, textfield5, textfield6] In a page i have following fields textfield1 textfield2

[Wtr-general] OT: Regular Expression help

2007-03-15 Thread Paul Carvalho
Hi there. After several hours of looking at this problem, I've decided to ask for some help. Here's the problem: I have an input text file that has a series of values stored like this: one 1 0.1234 0 4 two 3 1. 1 0 ... I want the values in the 4th and 5th quotes on each

Re: [Wtr-general] OT: Regular Expression help

2007-03-15 Thread Paul Carvalho
On 15/03/07, Alan Ark wrote: Hi Paul. Just a few notes. Here's a regex that I came up with. I used the ? qualifier to make the regex non-greedy – which probably would have been the next thing that you ran into. Hi Alan, thanks for the reply. Your regex string does work in IRB but still

Re: [Wtr-general] How to clear the cache of the browser?

2007-03-08 Thread Paul Carvalho
Hi Bach, just wanted to chime in on your suggestion. I tried a similar IE 6 browser setup a year or so ago when testing one of our web apps. I noticed very strange behaviour that was directly traceable back to the Cookie settings. For our secure (https) web app, it was looking for some cookie

Re: [Wtr-general] Excel Interface Class

2007-03-05 Thread Paul Carvalho
By any chance, would anyone be interested in writing a hook into Google Spreadsheets? I guess you'd sacrifice speed for portability. Paul C. On 05/03/07, Paul Rogers [EMAIL PROTECTED] wrote: I use Open Office. Having the Excel reader is handy, but it obviously doesnt work for me. I started

Re: [Wtr-general] Selecting an 'accented character' from a list

2007-03-02 Thread Paul Carvalho
Hi John, this may or may not be useful but when I work with accented items like these, I treat them like a black box. That is, I don't look into the box to see how Ruby translates them .. which may or may not be how Ruby really sees them. In your select_list, can you refer to that service name

Re: [Wtr-general] Test Data Cleanup/Reset Database in a .bat between tests

2007-02-26 Thread Paul Carvalho
I think you might be interested in the 'setup' and 'teardown' methods. Read through the ruby-doc.org page on the Test:Unit module. On 26/02/07, Jason [EMAIL PROTECTED] wrote: I have numerous TC methods within a class. Before I execute the script, I have a batch file (C:\mybatchfile.bat) I

Re: [Wtr-general] TextField#set and utf-8

2007-02-23 Thread Paul Carvalho
I was able to input extended Ascii characters into text fields but I didn't do it this way. I should clarify that they were accented European characters, not CJK. I have a Watir script that sets up the base test data in the system. It reads the inputs from an Excel file into an Array and then I

Re: [Wtr-general] while not exists does not work in Firewatir?

2007-02-13 Thread Paul Carvalho
Steve wrote: while not ($browser.link(:text,Withdraw).exists?) sleep 1 $browser.reload() end 1.) Is there a better way for me to do this? I am not sure why you are getting the text of old screen. This question reminds me of a similar problem that I

Re: [Wtr-general] OT: algorithm help?

2007-02-13 Thread Paul Carvalho
Hi Chris, unfortunately, I don't remember enough math right now to be able to offer a better solution than what you've already come up with. The only catch that I can think of is that since you are looking for a *percentage*, the many in your many.times do loop needs to be a relatively large

Re: [Wtr-general] 'http://wiki.rubygarden.org/Ruby/page/show/ScriptingExcel', is not working

2007-02-11 Thread Paul Carvalho
Looks like RubyGarden is temporarily down - perhaps a maintenance window. I've attached a copy of the page that I happened to have saved for just such an emergency. ;-) Cheers. Paul C. On 12/02/07, vijay [EMAIL PROTECTED] wrote: Hello people, The link,

Re: [Wtr-general] A Different WIN32OLERuntimeError (Ruby)

2007-02-07 Thread Paul Carvalho
Why don't you just use the Watir command to do this? Am I missing something? myIE = IE.new Nathan Christie wrote: [b]irb(main):002:0 myIE = WIN32OLE.new( InternetExplorer.Application ) ___ Wtr-general mailing list Wtr-general@rubyforge.org

Re: [Wtr-general] A Different WIN32OLERuntimeError (Ruby)

2007-02-07 Thread Paul Carvalho
Ah. Thanks for the info. I haven't noticed that problem/error before on my system that's running Ruby 184-20 and Watir 1.4.1, so I never really looked closely at what the underlying calls are. As far as I'm concerned, if it works don't look any further. ;-) Good luck. Paul C. On 07/02/07,

Re: [Wtr-general] renaming sheets in Excel

2007-02-07 Thread Paul Carvalho
Hi Alan, I'm interested in the answer to your question but I don't know what it is. I suggest reading through this message in the archive: http://rubyforge.org/pipermail/wtr-general/2006-September/007592.html Let us know what you find out. Cheers. Paul C. On 07/02/07, alan wrote: Hi,

Re: [Wtr-general] while not exists does not work in Firewatir?

2007-02-06 Thread Paul Carvalho
I try to avoid icky double negatives. Does the following line work for you instead? sleep 0.5 until $browser.link(:text, Withdraw).exists? On 05/02/07, steven [EMAIL PROTECTED] wrote: The following code only seems to work if $browser = ie.new, and not firefox.new (i.e. with Firewatir). Am

Re: [Wtr-general] Installation Problem

2007-02-05 Thread Paul Carvalho
Install Watir 1.4.1 to a folder with no spaces in it. e.g. C:\Watir It should work. On 02/02/07, RobG [EMAIL PROTECTED] wrote: I hope this is an acceptable topic for this list... I just installed Ruby 1.8.5 on my system, and then, with much effort, managed to get the watir-1.4.1.exe

Re: [Wtr-general] Everyday Scripting with Ruby (the book)

2007-02-05 Thread Paul Carvalho
On 01/02/07, Richard Conroy wrote: I am curious what everyone thinks of this (new) book. It starts off well, with the first example tutorial being how to test if an uninstaller worked. No hello world, silly arithmetic examples etc. Well it is ordered, I will know myself soon. I reviewed a

Re: [Wtr-general] undefined method `[]' for nil:NilClass (NoMethodError) error at the end of array???

2007-01-24 Thread Paul Carvalho
On 23/01/07, Bret Pettichord wrote: This is largely because Watir is stupid in this area. We made a bad design choice with Watir 1.0. We'd now like to make Watir consistent and start with 0 everywhere (like everything else in Ruby) but this would raise compatibility issues. We welcome your

Re: [Wtr-general] undefined method `[]' for nil:NilClass (NoMethodError) error at the end of array???

2007-01-23 Thread Paul Carvalho
This is one of those times when I'll never understand why some things in programming start counting at 1 and some things start counting at 0. I, too, have several similar loops in some of my scripts, but I opted for the more readable format of saying: t.length.times { |x| puts t[x][0] } I

Re: [Wtr-general] Ruby equivalent of 'Continue' in C

2007-01-19 Thread Paul Carvalho
For those of us who don't know how to program in C, can you please explain what Continue does? It's not entirely clear to me what you are trying to do. On 19/01/07, sarita [EMAIL PROTECTED] wrote: I want to execute a test on a table where links are to be clicked based upon its status. Only

Re: [Wtr-general] Watir with Ajax

2007-01-19 Thread Paul Carvalho
Are these links and fields within frames? Do you know if the frame has completely finished loading after the click and before the text_field is set? What version of Watir are you using? On 19/01/07, Naga Harish Kanegolla [EMAIL PROTECTED] wrote: HI, But its not working for me. Basically

[Wtr-general] OT - Bug in Ruby with adding strings?

2007-01-19 Thread Paul Carvalho
I just found what looks like a bug in Ruby. Here's a simple script that will expose this bug: irb(main):001:0 x = 1 = 1 irb(main):002:0 puts 'foo' + x.to_s +'bar' SyntaxError: compile error (irb):2: syntax error puts 'foo' + x.to_s +'bar' ^ from (irb):2 I

Re: [Wtr-general] What does IE.down_load_time really measure?

2007-01-15 Thread Paul Carvalho
On 13/01/07, Bret Pettichord wrote: Would it be possible for you to provide code and output that are synced up with each other? Bret Sure thing. Rather than include everything, here are some relevant bits: Aside: filename written to from the setup method: filename1 =

Re: [Wtr-general] What does IE.down_load_time really measure?

2007-01-15 Thread Paul Carvalho
Hey Bret, I have another question. I'm almost finished updating another script that walks through the pages of another web app and I'm noticing that the average difference between the timers is ~ 2.0 seconds! This second app is mostly frames though. So when I issue the following command:

Re: [Wtr-general] problem in accessing elements of web page

2007-01-12 Thread Paul Carvalho
Instead of ie.wait, I wrote and use the following method call: def wait_for_frames $ie.wait if $ie.document.frames.length 0 $ie.document.frames.length.times {|x| $ie.frame(:index, x+1 ).wait } end end I imagine others may use something similar. You should be able to

Re: [Wtr-general] Iterating through all options of a List Box which is again dynamic

2007-01-12 Thread Paul Carvalho
You can use something similar to the following to get you started: variable = ie.select_list( :id, /ListName/).getAllContents On 12/01/07, sarita [EMAIL PROTECTED] wrote: I want to run a test, which'll create one sample record for each option in the List Box. Again the options in List Box

[Wtr-general] Need Regular Expression help with a URL string

2007-01-11 Thread Paul Carvalho
Okay, I give up. I've worked on this for over an hour and I need more experienced help. (Web searches and book references haven't helped either.) I have a URL in a string and I'd like to replace part of it but first I need to find the part that I care about. Here's an example of the string:

Re: [Wtr-general] Need Regular Expression help with a URL string

2007-01-11 Thread Paul Carvalho
Thanks Alan! That works better than what I was trying to do. Now I can create the new URL with a line like: new_url = ie.url[/(.*)\//] + new_page.html Sweet! I was trying expressions like =~ /\\// but wasn't having any luck. Cheers! Paul C. On 11/01/07, Alan Ark [EMAIL PROTECTED] wrote:

Re: [Wtr-general] OT: Need help Trapping Errors in Ruby

2007-01-11 Thread Paul Carvalho
Hi Nathan, thanks for the follow-up. I do have it working, as per my last message in this thread, but I'll offer some additional info here since you asked. The $something_went_wrong variable is a legacy variable from when I first wrote these scripts using Watir and I was trying to tell the

Re: [Wtr-general] What does IE.down_load_time really measure?

2007-01-11 Thread Paul Carvalho
Okay, I didn't want to reply right away without trying a few things first. My results seem to be consistent in that my second counter is always larger than the default down_load_time value. On 10/01/07, Bret Pettichord wrote: The down_load_time is the amount of time that watir waits in the

Re: [Wtr-general] Error with file_field in a modal window (using 1.8.2 / 1.5.1.1127 )

2007-01-10 Thread Paul Carvalho
And you do this how...? Perhaps you should include a link, reference or example of how to do this in your response. On 10/01/07, Angrez Singh [EMAIL PROTECTED] wrote: Hi John, You can manually install AutoIt dll using regsvr32 command. Regards, Angrez

[Wtr-general] OT: Need help Trapping Errors in Ruby

2007-01-10 Thread Paul Carvalho
Hi there, I've got more of a Ruby question than a Watir one, so I hope you don't mind if I post it here first. I am in the process of rewriting my first Ruby/Watir scripts from a year ago - a site-map walkthrough script to collect some simple Performance metrics. When I first wrote the script, I

Re: [Wtr-general] OT: Need help Trapping Errors in Ruby

2007-01-10 Thread Paul Carvalho
page_set is just a local variable used to call the method name that I want to execute. I'm basically calling a method (e.g. 'walk_Public_Pages') from within a method (page_set_to_check) that is supposed to trap the errors/exceptions. However, if there's an error in the 'walk_Public_Pages'

[Wtr-general] What does IE.down_load_time really measure?

2007-01-10 Thread Paul Carvalho
I've got a script that walks through a simple web application and retrieves the page size and page download times. (By simple web app I mean no frames and only about a dozen pages - mostly reports and a Personal Settings page.) The script outputs these values to an output CSV file so that I can

Re: [Wtr-general] OT: Need help Trapping Errors in Ruby

2007-01-10 Thread Paul Carvalho
Got the answer I need from the Programming Ruby 2nd Edition book and thought I would share it here. From the Handling Exceptions section (p. 361), I got that I should add the rescue block to the end of my site-walking methods, and not the calling method (i.e. page_set_to_check()). Basically I

Re: [Wtr-general] What does IE.down_load_time really measure?

2007-01-10 Thread Paul Carvalho
Hmm, okay, so it looks like there are two interesting sub-measures then. From a user's perspective, a web page's response time would equal down_load_time + render time. How much faith should we put in the IE.down_load_time attribute if it doesn't include the render time? I mean, I *watched*

Re: [Wtr-general] Menu links have duplicate attributes

2007-01-08 Thread Paul Carvalho
I also have duplicate menu names in one of our apps. I just use the link's index number instead. It's not as nice or convenient as using the text, but I don't mind hard-coding a link index every now and then if it means I can get on with the test and move onto the next thing. On 08/01/07,

Re: [Wtr-general] Does Watir support a .Net webbased application?

2006-12-12 Thread Paul Carvalho
I have been using Watir to test our .Net web app for almost a year now. Did you check to see if there were any frames in your window? On 12/12/06, Devesh [EMAIL PROTECTED] wrote: Can Watir be used for testing a .Net based web application ? On running showAllObjects() function on an .net

Re: [Wtr-general] how to access an element whose html tag is A

2006-12-12 Thread Paul Carvalho
Unless I'm mistaken, A HREF.. Click Here /A is a link. Did you try the ie.link method? On 11/12/06, vijay [EMAIL PROTECTED] wrote: Hello people, I do not know how to access an element whose html tag is A. There is a link, named 'Step 1. Details'. According to its View Source, it is

Re: [Wtr-general] Identifying a tab to click on

2006-12-03 Thread Paul Carvalho
Maybe you're being too specific? Did you try just: $ie.span(:index, 1).click Or, based on the id tag, does this work: $ie.span(:id, 'firstTab').click On 03/12/06, Neil Daniell [EMAIL PROTECTED] wrote: I am trying to use Watir to click on secondTab but cannot seem to get the following to

Re: [Wtr-general] WIN32OLERuntimeError - I get this error after two hours - see details

2006-11-10 Thread Paul Carvalho
Hello Nathan, thanks for all the details you included in your initial post. While I don't think I can add anything more to the programming/troubleshooting side of things than have already been offered, I haven't seen anyone yet ask what else is going on in the system. Do you have any other

Re: [Wtr-general] OT: Programming/Ruby Logic question

2006-10-30 Thread Paul Carvalho
I like your simplification, thanks.What I was originally trying to do was use a CASE structure, but I couldn't figure out how to use multiple comparisons. That is, I tried something like this:case array[ position ] when 'foo' then start_col = 1 when 'green eggs' then start_col = 10 when 'ham'

[Wtr-general] OT: Programming/Ruby Logic question

2006-10-27 Thread Paul Carvalho
Hi there, I've been staring at a piece of code trying to get it to work for a while and I think I need a break. I have just one piece of the puzzle left to figure out and it's not really a Watir problem. Here's the problem simplified... I have an array with changing contents that I'm working with.

Re: [Wtr-general] OT: Programming/Ruby Logic question

2006-10-27 Thread Paul Carvalho
= 30 first_seen = false elsif array[ position ] == 'bar' and ! first_seen start_col = 40 end ...endThis works in this example because there are at most only two occurrences of 'bar' in the array.Now onto the next thing. Have a great weekend!Cheers. Paul C. On 27/10/06, Paul Carvalho [EMAIL

Re: [Wtr-general] Wtr-general Digest, Vol 35, Issue 27

2006-10-25 Thread Paul Carvalho
Hmm, that's an interesting problem. When I first evaluated Watir to see if it would work with our .Net web app, it was important to figure out how to work with our tree control. Each tree control/library out there is different and none of the referenced examples that I could find worked for me.

Re: [Wtr-general] Error selecting links within nested iFrame?

2006-10-25 Thread Paul Carvalho
I'm running Watir 1.4.1 (from Windows Installer) and Ruby 1.8.4-16 on my main machine.I copied your iframe_nested.html files into my C:\Scripts\1.4.1\unittests\html folder, and renamed your rb file to frame_test_Ethan.rb and placed it in my unittests folder. To begin with, I re-ran the standard

Re: [Wtr-general] How do you access an image that doesn't have img in the HTML tag?

2006-10-05 Thread Paul Carvalho
Hello Eva,What output does the following command produce when executed at an IRB prompt? ie.show_imagesOr if it's in a frame: ie.frame(:name, 'framename').show_images On 04/10/06, Eva [EMAIL PROTECTED] wrote: Typically image have this tag...[snip] I know this isn't a typical image tag. I believe

Re: [Wtr-general] Joining two variables

2006-10-03 Thread Paul Carvalho
Hello Astha, you would do it in Ruby just about exactly as you have suggested.I would suggest a minor change to your data content though. You should either remove the final slash (/) from the first variable, or the first slash from the second. Otherwise your built-up URL will look like:

Re: [Wtr-general] regex url

2006-09-28 Thread Paul Carvalho
Technically, you didn't send us the full link in your post. You sent us only a part of the full link. Can you simplify your regex? That is, is this good enough? $ie.link(:url, /selectTerritory/).clickOccam's razor works for me. Keep it as simple as possible. Paul.On 28/09/06, Adrian Lewis [EMAIL

Re: [Wtr-general] Managing the Watir Project -- Wikipedia entry

2006-09-26 Thread Paul Carvalho
Nice! Thanks. =)On 26/09/06, Sun [EMAIL PROTECTED] wrote: Regarding documentation, please see: http://en.wikipedia.org/wiki/WatirI have updated this by creating an example information section, plus updating the base note, and adding links to External Links and See Also.

Re: [Wtr-general] cell access

2006-09-23 Thread Paul Carvalho
Umm.. I have no idea what you're talking about, Bill. th is just a td with some fancy formatting. I see no reason why a command like the following wouldn't work with Watir 1.4.1:irb ie.table(:index, 1)[1][3].flash As with anything you do, there are usually a few ways to get to a particular object

Re: [Wtr-general] Unit tests failed.

2006-09-17 Thread Paul Carvalho
Hi Raghu, Thank you for sending the output files. I suspect the problem is because you installed Watir into the Program Files folder. I've found that Ruby sometimes works unexpectedly if there are spaces in the folder or file name. If you try to reinstall Watir off the root directory (e.g.

Re: [Wtr-general] Unit tests failed.

2006-09-16 Thread Paul Carvalho
Hi Raghu, I believe this is a known issue with the 1.4.1 release. You can download the zip file for the previous (1.4) release to get the missing images subfolder.1. Go to: http://rubyforge.org/frs/?group_id=1042. Download the watir-v1_4.zip file3. Open the zip file and copy the

Re: [Wtr-general] Do you want Watir to be more popular?

2006-09-15 Thread Paul Carvalho
On 15/09/06, Bret Pettichord [EMAIL PROTECTED] wrote: A couple of recent posts were premised on the assumption that we wantWatir to be more popular? Do we? Why?I say 'yes', we do want it to be more popular. Here's my reason why.I first started out in this industry as a programmer for several

Re: [Wtr-general] I am a newb

2006-09-01 Thread Paul Carvalho
On 01/09/06, Phlip [EMAIL PROTECTED] wrote: To the Ruby users: Where's the nearest ProgrammingRuby.chm for the OP?Does Watir come with it?Should be installed with Ruby itself. On my hard drive, I found a copy located in the /ruby/doc folder. ___

Re: [Wtr-general] Global Variables

2006-09-01 Thread Paul Carvalho
Is it called Duck Typing when Ruby figures out the variables as it goes along?That totally rocks. I only declare things as I need them in my scripts, and if my tests didn't run sequentially I would be totally screwed. =) On 01/09/06, Chris McMahon [EMAIL PROTECTED] wrote: Perl forces you to

Re: [Wtr-general] OT: Ruby FTP behind a Firewall

2006-08-25 Thread Paul Carvalho
Aha! Thanks Chris. My google searches didn't turn up that hit.Unfortunately, it gets me one step further but I still cannot connect:irb(main):001:0 require 'net/ftp'= trueirb(main):002:0 ftp = Net:: FTP.new= #Net::FTP:0x2bee920 @mon_owner=nil, @debug_mode=false, @mon_waiting_queue=[],

Re: [Wtr-general] OT: Ruby FTP behind a Firewall

2006-08-25 Thread Paul Carvalho
Hoo-ahh! Got it! After much convincing, I managed to get our IT guy to look into the problem in more detail. This is what he wrote back to me:I did find one thing. They may be doing a reverse DNS lookup (our outgoing IP) and then seeing if that IP has an A record. We didn't have an A record for

Re: [Wtr-general] method which contains array as the parameter

2006-08-21 Thread Paul Carvalho
You can also use the each method... as in:def run_check_links(ieHelper, arrayText) arrayText.each do |link_text| assert(ieHelper.link(:text, link_text.exists?) assert(ieHelper.link (:text, link_text.enabled?) assert_equal(link, ieHelper.link(:text, link_text).type ) endendOn 21/08/06, sikander

[Wtr-general] Regex string comparison

2006-08-15 Thread Paul Carvalho
Hi there, I'm still a novice when it comes to using regular expressions and am having a bit of difficulty figuring out the syntax on the following problem.Here's what I want to do:- I'm trying to create a branch in the code if the PageHeadingLabel contains one of two words. Here's the line that

Re: [Wtr-general] Regex string comparison

2006-08-15 Thread Paul Carvalho
Sweet! Worked like a charm. Thanks. Learned something new today. I guess I can go home now. ;-)Cheers! Paul.On 15/08/06, Dave Hoover [EMAIL PROTECTED] wrote:Yep, use the String#match method. http://www.ruby-doc.org/core/classes/String.html#M000583 ___

Re: [Wtr-general] Navigating in IE frames

2006-08-10 Thread Paul Carvalho
Yes, you do need to specify the frame. Try something like: ie.frame('FrameName').text_field(:name, inpListFilter ).set(adm )You should be able to incorporate the FrameName into your 'ECMTestFixture' object. To see the frames that Ruby/Watir sees, try the following at an IRB prompt:

Re: [Wtr-general] Incrementing object names

2006-08-08 Thread Paul Carvalho
I use similar mixed variables in my scripts but I use the 'succ' method rather than trying to manually figure it out.For your sample code below, I might rework it to something like:def enter_data x = 0 ; object_name = 'A10' read_in_test_data... ... object_name.succ! p object_name ...endHope this

Re: [Wtr-general] Watir, file_field, dojo and VMware

2006-07-27 Thread Paul Carvalho
I have used VMware with Watir successfully. I've got a WinXP Pro SP2 VMware session that has IE7 Beta 2. On it, I have Ruby 1.8.4 and Watir 1.4.1.I just ran the UnitTest filefield_test.rb and it executed without error. I can't say I really understand what the problem described below is, so I can't

Re: [Wtr-general] problem in click event of div

2006-07-21 Thread Paul Carvalho
Hi Vikash,Maybe your code is working. Maybe it just doesn't do what you think it should do.Are you trying to access the checkbox? If so, why not just try something more direct like: ie.checkbox(:id, /3_1/).flash ie.checkbox(:id, /3_1/).setOn 22/07/06, VIKASH KUMAR [EMAIL PROTECTED] wrote: div

Re: [Wtr-general] for loop syntax??

2006-07-19 Thread Paul Carvalho
Ruby rocks! My fav is: 9.times{|x|putsx}It doesn't get any clearer for me than just telling it how many times I want it to loop without worrying about extra syntax that I'm likely to get wrong.. ;) On 19/07/06, Chris McMahon [EMAIL PROTECTED] wrote: On 7/19/06, mi [EMAIL PROTECTED] wrote:

Re: [Wtr-general] Watir Users forum at forums.openqa.org

2006-06-21 Thread Paul Carvalho
Yes, I think it would be a great idea.On 21/06/06, Bret Pettichord [EMAIL PROTECTED] wrote: Zeljko,The plan has been to rename that forum Watir General and then to set up a mirror (or whatever you call it) between this list and that forum. Thus everything that is posted here would show up there

Re: [Wtr-general] tag a name to an assertation

2006-06-14 Thread Paul Carvalho
I recommend Zeljko's one-line assert statement, but *if* you really want to keep the format you have now, you can also use the 'flunk' command.For example:if $ie.select_list(:name, 'criteria.countryId').exists? assert(true) else flunk( select_list(:name, 'criteria.countryId') does not exist )

[Wtr-general] How do I set the end of a string to a variable?

2006-05-16 Thread Paul Carvalho
Okay. I know that I should know this, but knowing that doesn't mean that I know it. arrrg. This is a Ruby string manipulation question, not really a Watir question.I have this label on a web page - we'll call it PageHeadingLabel - and the contents change based on selected user. I need to know how

[Wtr-general] OT: How to Navigate the Watir FAQ

2006-05-11 Thread Paul Carvalho
Hi there, this is totally aside and just 'FYI' so please disregard if you are not interested.It's been bugging me for a few weeks so I just took a look and discovered why the anchors to the FAQ haven't been working as expected. Here's an example -- Bret sent out the following link in a recent

Re: [Wtr-general] OT: How to Navigate the Watir FAQ

2006-05-11 Thread Paul Carvalho
Really? I tried the corrected links on IE6 in WinXPSP2 before I posted my observations and they work for me. Mind you, I always get a few Runtime Errors when I try to connect to that page with IE6 for some reason, but the FAQ and correct section *do* appear. That is strange. Oh well.Paul.On

Re: [Wtr-general] frame.html fails in development version

2006-05-10 Thread Paul Carvalho
This is a known problem in 1.5. The description is perhaps not clear enough to be found by a search, but it is in JIRA: http://jira.openqa.org/browse/WTR-13Technically, there's nothing wrong with the google_maps.rb script... it just fails because the frame.html fails in the script.Paul.On

Re: [Wtr-general] Order of execution for ruby tests with test/unit

2006-05-04 Thread Paul Carvalho
Hi George, it's been my experience that the unit tests run in what appears to be an alphanumerically-ascending order. It's been a while since I've looked at it, but I think this is the general pattern. (This is all off the top of my head, but I'm sure I can easily confirm it. I still have the

Re: [Wtr-general] Ruby IDE

2006-05-03 Thread Paul Carvalho
I've been using SciTE. Until now I haven't heard of Arachno Ruby.. maybe I'll check it out.Every time I try FreeRIDE it always disappoints me. I tried it again just now - it doesn't like my dual monitor setup (does weird things with the menus), and it hangs for some reason in the middle of my

Re: [Wtr-general] Access Denied with Frames

2006-05-02 Thread Paul Carvalho
Just for the record, none of the advice in this FAQ entry have helped me get rid of this error. =(I'm not trying to navigate to a frame on another site, but the two outside (empty) frames are hosted on a separate resource web site. When I check the frames, I see the following output:

Re: [Wtr-general] The Watir Installer

2006-05-01 Thread Paul Carvalho
You could also create a batch file called 'install.bat' that simply has the gem install watir command.On 01/05/06, Bret Pettichord [EMAIL PROTECTED] wrote: Harry,Just download the gem the way you would download any other file.Then you need open a command window, and cd to the directory containing

Re: [Wtr-general] How can I read alternate field attributes into a variable?

2006-04-26 Thread Paul Carvalho
Hi Zeljko, Yes. That's what I need. Seems obvious now - I can't believe I didn't find it in the API reference.Cheers. Paul.On 26/04/06, Zeljko Filipin [EMAIL PROTECTED] wrote: I guess that you will know how to assign it to variable and use thatvariable (if I am wrong, let me know).

[Wtr-general] Need Help redirecting the Test Unit output

2006-04-25 Thread Paul Carvalho
Hi there, I'm trying to capture the Test Unit output to a file but I'm not exactly sure of what it is I need to capture. I thought it was STDOUT, but now I'm not so sure. Here's an example of what I want...In the Watir\Unittests\ folder, run the script: iostring_test.rb It has the following

Re: [Wtr-general] Need Help redirecting the Test Unit output

2006-04-25 Thread Paul Carvalho
That's a fair question. I'd like a bit more control over what output I actually save to file. For instance, the web app under test has frames where some of them return the 'Access is Denied' warnings. I'd like to weed out all that crap.. err, noise.. and just see the test summary. The output

[Wtr-general] How can I read alternate field attributes into a variable?

2006-04-25 Thread Paul Carvalho
Most of my Watir scripts generate their own random inputs (content and length), but I always have to specify an upper limit for each data value specified.For example, a Create New User page has the following HTML for a User Name input field: INPUT class=fieldLarge id=_ctl0_UserNameField

Re: [Wtr-general] Saving HTML to output adds extra line feeds?

2006-04-21 Thread Paul Carvalho
Thanks for the replies Bill, but neither (write or print) seemed to work for me. That is, the output still had the extra line feeds.I decided to try removing the extra line feeds manually and it worked, so I'll go with that for now: f_e.puts html_content.delete( 10.chr )Cheers! Paul.On 21/04/06,

Re: [Wtr-general] Unable to Click on tab - any workaround??

2006-04-19 Thread Paul Carvalho
Thanks for sending the screenshot, but the bit of source code that you sent is only a list of functions -- it's not the HTML itself. Unless I'm reading it wrong, you should be looking elsewhere in the HTML source. There are many different html elements that you can look for (e.g. tables, spans,

Re: [Wtr-general] Can a link to the Watir licence be posted on the Watir homepage?

2006-04-18 Thread Paul Carvalho
I just added the License to the main page. I copied the License from the ReadMe in the Watir API Reference. Someone can update it if it's not the correct one or if there have been other changes made to it since it was first written ( e.g. does the Copyright year need to include 2006 now?).Hope

Re: [Wtr-general] Unable to Click on tab - any workaround??

2006-04-18 Thread Paul Carvalho
Hi there, you've given us some information about the problem, but not enough to provide you with an exact answer. One thing that I would recommend to you would be to spend some more time looking at the objects on the page to try and understand exactly how the tabs are placed on the page. For

Re: [Wtr-general] SciTE Repeats Input Chars in IRB

2006-04-04 Thread Paul Carvalho
Hello Eli, there's a lot of information you didn't offer to allow us to help you better.What version of Ruby are you using (so we know the version of SciTE)? What version of Watir?How are you executing the scripts? Which input chars are being echoed? Can you include a sample of your code and the

Re: [Wtr-general] SciTE Repeats Input Chars in IRB

2006-04-04 Thread Paul Carvalho
Ah, now I see. I am using Ruby 1.8.4-16 with SciTE 1.67. There is *no* Run irb under the Tools menu.I guess it didn't work so they took it out. Sorry. Looks like you'll have to CMD-prompt it to work around this problem. Cheers. Paul.On 04/04/06, Eli Smith [EMAIL PROTECTED] wrote:

Re: [Wtr-general] SciTE Repeats Input Chars in IRB

2006-04-04 Thread Paul Carvalho
Hi Eli, you can execute your scripts from within SciTE too. Just press [F8] to see the output pane and press [F5] to run the script. The output pane shows you the output that you would normally see in a command window. No need to run it separately. Hope this helps. Paul.On 04/04/06, Eli Smith

[Wtr-general] OT: Line Order in Scripts and Writing File Output

2006-03-22 Thread Paul Carvalho
Hi there, please forgive the Off-Topic question. Let me know if I should try another forum or resource (and which ones they are).I'm trying to refactor one set of Watir scripts into separate files so that it is more like the setup used in the UnitTests and I seem to be having some difficulty

  1   2   >