[wtr-general] Unable to install watir
Hi, 1.Downloaded ruby186-26.exe 2.Installed it 3.got following error when im tried to install watir: C:\Documents and Settings\la>gem update --system Updating RubyGems... ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) No connection could be made because the target machine actively refused it. - connect(2)(Errno::ECONNREFUSED) C:\Documents and Settings\la>gem install watir ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) No connection could be made because the target machine actively refused it. - connect(2)(Errno::ECONNREFUSED) Please help me Thanks, Aruna --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Watir Podcast 15: AWTA 2009 Lisa Crispin and Janet Gregory
http://watirpodcast.com/awta-2009-lisa-crispin-and-janet-gregory/ I talk with Lisa Crispin and Janet Gregory about AWTA 2009 and Agile Testing Book. Not even 7 minutes long, so it should not waste a lot of your time. I hope you like it. If you have a comment, please leave it at web site, reply to @zeljkofilipin at twitter or reply to this e-mail. I do appreciate comments. I have 3 more podcasts recorded at awta, I hope to publish them at least one each week. Ž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] browser seems to hang sporadically
Has anyone seen this problem running Watir suites in Vista (64-bit) / IE7? We have a number of Watir suites, plus one big giant suite that includes all the others, the giant one takes maybe 3 hours to run. I ran this giant suite for 3+ years unattended on XP / IE6 without too much trouble - I'd kick it off when I left for the day. Occasionally a script would get an error I couldn't figure out - it would run fine when I ran it individually. But probably 4 out of 5 times, it ran fine with no errors at all. It took me quite awhile to get everything working on Vista with the latest Ruby and Watir (1.6.2). If I run the big giant suite, at some point, the browser window just seems to hang - as if it is waiting for it to render. As far as I can tell, this doesn't consistently happen in the same place, it seems pretty random. Usually if I refresh the browser window manually, the suite can continue. If I run a large suite unattended, it always does that at some point, and of course I'm not here to 'wake it up' again. I thought it was because my Vista and hard drive were sleeping, so I set the sleep setting to 4 hours, but that didn't help much (definitely if the hard drive sleeps while the suites are running they will stop, but they get hung up even if the hard drive doesn't sleep). My temporary solution is run two suites separately rather than one big one while I am at work, and keep an eye on it so I can tickle it into going again if it hangs. But this is kind of a drag, I can't use the PC really while the scripts are running (I have a Mac and a Linux box to use so that isn't a giant problem but an annoyance). I've spent so much time on this that I have to move on, at least I can run the tests. I'm just wondering if anyone else has experienced the same problem? Is there some better way to run Watir scripts as a regression suite? thanks, Lisa --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: IE browser not launching when you instantiate a new version of the browser...
Thanks Lisa. After stepping though browser.rb, still could not figure out why I could not get back a good reference to IE. After wasting a few hours, did the unimaginable - re-installed ruby and watir and back to normal. Just un-installing watir did not do the trick. Anyhow, thanks again. Back to real work :-) On Feb 3, 12:25 pm, Lisa Crispin wrote: > This works for me in Vista 64 bit, although I got an ugly error message with > it. If I did require 'watir/ie' first, then I didn't get an error message. > > > > On Tue, Feb 3, 2009 at 10:07 AM, bwaybandit wrote: > > > Hi, > > > Anyone see this below? This works for Firefox, but when I try to > > launch IE, seems like I do not get back an instance of the browser. > > This was working all morning and not sure what has caused this to > > happen. Has anyone has run into this? (Ruby - 1.8.6 / Watir - 1.6.2) > > > irb(main):006:0> browser=Watir::Browser.new > > => # > > > Thanks, > > > Len > > -- > 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: Getting each value in excel and converting it while doing it
Hi, Ok, thank you for the tip. At the top (if my cells contain just text) then I can state: bnk = worksheet.Range("g2:g4").Value ? Even if the text are numbers? Any idea how I loop through ranges without knowing how many rows the column consists of? As in bnk = worksheet.Range("g2:g4").Value ? Where I instead could have a parameter instead of g2:g4, i.e. while loop that loops until there are no more columns to pick (nil?) Could you maybe write a suggestion for such a loop? Cheers! On Feb 3, 4:27 pm, Loft_Tester wrote: > If you can change the formating of the excel cells were that data is > stored to "text" that would probably be the cheapest resolution for > you. If you have to change the data once it is already loaded in to > ruby there are many options open to you. > > I recommend changing the spreadsheet --~--~-~--~~~---~--~~ 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: unit test load order
True. require 'watir/testcase' and then subclass Watir::TestCase instead of Test::Unit::TestCase. Bret aidy lewis wrote: > Unit tests should be independent. I don't think we can make the same > assumption about business facing tests. This is another reason why I > believe xUnit to be an inadequate narrative for Story Testing. > However, if I remember correctly Bret wrote > something to re-order Test::Unit methods. > > Aidy > > On 03/02/2009, Nathan Lane wrote: > >> No, Ruby's unit test infrastructure and similar infrastructures use >> reflection to get each of the tests' names, which are always returned in >> alphanumeric order. So if you want your tests to run in a specific order, >> then you must name them with that in mind. >> >> On Tue, Feb 3, 2009 at 7:44 AM, Loft_Tester wrote: >> >>> Hi All, >>> >>> In order to kick off a unit test from a another file we are requiring >>> that file. To launch a whole suite of tests we require multiple >>> files. It seems that the order that the test run are dependent on the >>> class name. Is there any was to conrtol the order that the test are >>> run with out changing the names of the classes. see example below. >>> >>> require "test1.rb" # class testset_1 >>> require "test2.rb" # class testset_2 >>> require "test3.rb" # class testset_3 >>> require "test4.rb" # class testset_4 >>> require "test5.rb" # class testset_5 >>> require "test6.rb" # class testset_6 >>> require "test7.rb" # class testset_7 >>> require "test8.rb" # class testset_8 >>> require "test9.rb" # class testset_9 >>> require "test10.rb" # class testset_10 >>> require "test11.rb" # class testset_11 >>> require "test12.rb" # class testset_12 >>> >>> The order I require the files in is the order that I would like the >>> test to run in. However, the order seems dependant on class names >>> here is the order that my test run. >>> >>> require "test1.rb" # class testset_1 >>> require "test10.rb" # class testset_10 >>> require "test11.rb" # class testset_11 >>> require "test12.rb" # class testset_12 >>> require "test2.rb" # class testset_2 >>> require "test3.rb" # class testset_3 >>> require "test4.rb" # class testset_4 >>> require "test5.rb" # class testset_5 >>> require "test6.rb" # class testset_6 >>> require "test7.rb" # class testset_7 >>> require "test8.rb" # class testset_8 >>> require "test9.rb" # class testset_9 >>> >>> Without changing the names of the classes or files is there a way to >>> control the test start order >>> >>> >>> >>> >>> >> >> -- >> Nathan Lane >> Home, http://www.nathandelane.com >> Blog, http://nathandelane.blogspot.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: unit test load order
You can specify the run order of your cases using a test suite file. Then to launch all the tests, you just execute the suite file. Check out the "Test Suite" section in the rdoc: http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/ The catch is that (as far as I know) the suite file has to contain a list of every single test case class you want to run (as shown in the rdoc suite example). That can be cumbersome if you have many tests, or if your list of cases frequently changes. Also, last I checked, all of test/unit's nifty command line options refuse to work if you use a suite file (like "-t" to specify a test case class name to run, "-n" to specify a test method, etc). They only seem to work if you are executing a file with test case definitions inside it. Pretty annoying, but maybe that was fixed in the latest version of test/unit - I haven't checked. Thanks Bill On Tue, Feb 3, 2009 at 6:44 AM, Loft_Tester wrote: > > Hi All, > > In order to kick off a unit test from a another file we are requiring > that file. To launch a whole suite of tests we require multiple > files. It seems that the order that the test run are dependent on the > class name. Is there any was to conrtol the order that the test are > run with out changing the names of the classes. see example below. > > require "test1.rb" # class testset_1 > require "test2.rb" # class testset_2 > require "test3.rb" # class testset_3 > require "test4.rb" # class testset_4 > require "test5.rb" # class testset_5 > require "test6.rb" # class testset_6 > require "test7.rb" # class testset_7 > require "test8.rb" # class testset_8 > require "test9.rb" # class testset_9 > require "test10.rb" # class testset_10 > require "test11.rb" # class testset_11 > require "test12.rb" # class testset_12 > > The order I require the files in is the order that I would like the > test to run in. However, the order seems dependant on class names > here is the order that my test run. > > require "test1.rb" # class testset_1 > require "test10.rb" # class testset_10 > require "test11.rb" # class testset_11 > require "test12.rb" # class testset_12 > require "test2.rb" # class testset_2 > require "test3.rb" # class testset_3 > require "test4.rb" # class testset_4 > require "test5.rb" # class testset_5 > require "test6.rb" # class testset_6 > require "test7.rb" # class testset_7 > require "test8.rb" # class testset_8 > require "test9.rb" # class testset_9 > > Without changing the names of the classes or files is there a way to > control the test start order > > > > > --~--~-~--~~~---~--~~ 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] located element but said it couldn't locate it?
Hey all. Got a weird one here. I am able to use the click method on the following image using its src, class, and alt attributes.: However, SciTe output displays the following error after my script completes successfully: 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 :class, "nursesText" (Watir::Exception::UnknownObjectException) I'm not sure why, because it did actually locate (and click) the element just fine. Any thoughts? --~--~-~--~~~---~--~~ 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: unit test load order
Unit tests should be independent. I don't think we can make the same assumption about business facing tests. This is another reason why I believe xUnit to be an inadequate narrative for Story Testing. However, if I remember correctly Bret wrote something to re-order Test::Unit methods. Aidy On 03/02/2009, Nathan Lane wrote: > No, Ruby's unit test infrastructure and similar infrastructures use > reflection to get each of the tests' names, which are always returned in > alphanumeric order. So if you want your tests to run in a specific order, > then you must name them with that in mind. > > On Tue, Feb 3, 2009 at 7:44 AM, Loft_Tester wrote: > > > > Hi All, > > > > In order to kick off a unit test from a another file we are requiring > > that file. To launch a whole suite of tests we require multiple > > files. It seems that the order that the test run are dependent on the > > class name. Is there any was to conrtol the order that the test are > > run with out changing the names of the classes. see example below. > > > > require "test1.rb" # class testset_1 > > require "test2.rb" # class testset_2 > > require "test3.rb" # class testset_3 > > require "test4.rb" # class testset_4 > > require "test5.rb" # class testset_5 > > require "test6.rb" # class testset_6 > > require "test7.rb" # class testset_7 > > require "test8.rb" # class testset_8 > > require "test9.rb" # class testset_9 > > require "test10.rb" # class testset_10 > > require "test11.rb" # class testset_11 > > require "test12.rb" # class testset_12 > > > > The order I require the files in is the order that I would like the > > test to run in. However, the order seems dependant on class names > > here is the order that my test run. > > > > require "test1.rb" # class testset_1 > > require "test10.rb" # class testset_10 > > require "test11.rb" # class testset_11 > > require "test12.rb" # class testset_12 > > require "test2.rb" # class testset_2 > > require "test3.rb" # class testset_3 > > require "test4.rb" # class testset_4 > > require "test5.rb" # class testset_5 > > require "test6.rb" # class testset_6 > > require "test7.rb" # class testset_7 > > require "test8.rb" # class testset_8 > > require "test9.rb" # class testset_9 > > > > Without changing the names of the classes or files is there a way to > > control the test start order > > > > > > > > > > > > -- > Nathan Lane > Home, http://www.nathandelane.com > Blog, http://nathandelane.blogspot.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: unit test load order
No, Ruby's unit test infrastructure and similar infrastructures use reflection to get each of the tests' names, which are always returned in alphanumeric order. So if you want your tests to run in a specific order, then you must name them with that in mind. On Tue, Feb 3, 2009 at 7:44 AM, Loft_Tester wrote: > > Hi All, > > In order to kick off a unit test from a another file we are requiring > that file. To launch a whole suite of tests we require multiple > files. It seems that the order that the test run are dependent on the > class name. Is there any was to conrtol the order that the test are > run with out changing the names of the classes. see example below. > > require "test1.rb" # class testset_1 > require "test2.rb" # class testset_2 > require "test3.rb" # class testset_3 > require "test4.rb" # class testset_4 > require "test5.rb" # class testset_5 > require "test6.rb" # class testset_6 > require "test7.rb" # class testset_7 > require "test8.rb" # class testset_8 > require "test9.rb" # class testset_9 > require "test10.rb" # class testset_10 > require "test11.rb" # class testset_11 > require "test12.rb" # class testset_12 > > The order I require the files in is the order that I would like the > test to run in. However, the order seems dependant on class names > here is the order that my test run. > > require "test1.rb" # class testset_1 > require "test10.rb" # class testset_10 > require "test11.rb" # class testset_11 > require "test12.rb" # class testset_12 > require "test2.rb" # class testset_2 > require "test3.rb" # class testset_3 > require "test4.rb" # class testset_4 > require "test5.rb" # class testset_5 > require "test6.rb" # class testset_6 > require "test7.rb" # class testset_7 > require "test8.rb" # class testset_8 > require "test9.rb" # class testset_9 > > Without changing the names of the classes or files is there a way to > control the test start order > > > > > -- Nathan Lane Home, http://www.nathandelane.com Blog, http://nathandelane.blogspot.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: IE browser not launching when you instantiate a new version of the browser...
This works for me in Vista 64 bit, although I got an ugly error message with it. If I did require 'watir/ie' first, then I didn't get an error message. On Tue, Feb 3, 2009 at 10:07 AM, bwaybandit wrote: > > Hi, > > Anyone see this below? This works for Firefox, but when I try to > launch IE, seems like I do not get back an instance of the browser. > This was working all morning and not sure what has caused this to > happen. Has anyone has run into this? (Ruby - 1.8.6 / Watir - 1.6.2) > > irb(main):006:0> browser=Watir::Browser.new > => # > > Thanks, > > Len > > > -- 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: IE browser not launching when you instantiate a new version of the browser...
OS is XP/sp2 On Feb 3, 12:07 pm, bwaybandit wrote: > Hi, > > Anyone see this below? This works for Firefox, but when I try to > launch IE, seems like I do not get back an instance of the browser. > This was working all morning and not sure what has caused this to > happen. Has anyone has run into this? (Ruby - 1.8.6 / Watir - 1.6.2) > > irb(main):006:0> browser=Watir::Browser.new > => # > > Thanks, > > Len --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] IE browser not launching when you instantiate a new version of the browser...
Hi, Anyone see this below? This works for Firefox, but when I try to launch IE, seems like I do not get back an instance of the browser. This was working all morning and not sure what has caused this to happen. Has anyone has run into this? (Ruby - 1.8.6 / Watir - 1.6.2) irb(main):006:0> browser=Watir::Browser.new => # Thanks, Len --~--~-~--~~~---~--~~ 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: NoMethodError: undefinied method 'goto' for #
Not sure. I did notice that you have some other method calls to the browser where you are trapping the NoMethodError. Why are you doing that? Also, it might help us if you could create a simple script that reproduces this problem. I personally don't have issues with the framework you've developed, but I think it is distracting some people and keeping them from helping you with your problem. Can you isolate the problem to a short procedure that doesn't use your framework (open-coding). Bret anna barbara ostrowska wrote: > Yes, sure > > Loaded suite All Tests > Started > EE > > Finished in 0h 0m 0s > > 1) Error: > test_send_public_gift(TC_Send_Private_Gift): > NoMethodError: undefined method `goto' for # > C:\Documents and Settings\anna\Desktop\ruby\Gifts/Wayn/user.rb:12:in > `login' > > C:\Documents and Settings\anna\Desktop\ruby\Gifts\PrivateGift.rb:15:in > `setu > p' > > 2) Error: > test_send_public_gift(TC_Send_Private_Gift): > NoMethodError: undefined method `close' for # > C:\Documents and Settings\anna\Desktop\ruby\Gifts\PrivateGift.rb:19:in > `tear > down' > > 1 tests, 0 assertions, 0 failures, 2 errors > > > 2009/2/2 Bret Pettichord : > >> Can you send us a stack trace? >> >> ab.ostrow...@gmail.com wrote: >> >>> Hi there! >>> >>> def setup >>> @browser = Wayn::BrowserFactory.create >>> @user = Wayn::User.new(@browser) >>> @user.login('tomcio', 'haslo') >>> end >>> >>> where >>> >>> class BrowserFactory >>> def BrowserFactory.create >>> browser = Watir::Browser.new >>> >>> begin >>> browser.speed = :zippy >>> browser.bring_to_front >>> rescue NoMethodError >>> end >>> >>> browser >>> end >>> end >>> end >>> >>> I have installed: >>> Ruby Version 1.8.6 >>> Installer Version 186-27 >>> firewatir 1.6.2 >>> commonwatir 1.6.2 >>> >>> I have following error: >>> No method error: undefinied method 'goto' for # >>> >>> I run the same script on another machine and it works therefore I dont >>> know whats cousing this error. >>> 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: button.Click_No_Wait only highlights the button, does not click
Of course you are right. The patch was attached to this email: http://rubyforge.org/pipermail/wtr-development/2009-January/000400.html It seems like this has not been put into Jira yet. Bret lokesh.agra...@gmail.com wrote: > I applied the patch but still the same issue. > This patch is for winClicker.rb I don't know how it's going to affect > click_no_wait method. > > Can anyone please help me out. > > > Thanks and Regards, > Lokesh Agrawal > > > On Feb 2, 9:08 pm, Bret Pettichord wrote: > >> http://jira.openqa.org/browse/WTR-279 >> >> lokesh.agra...@gmail.com wrote: >> >>> Hi Bret, >>> >>> Can you please tell me from where I can get the patch? >>> >>> Thanks and Regards, >>> Lokesh Agrawal >>> >>> On Jan 20, 7:53 am, Bret Pettichord wrote: >>> A patch that fixes this problem was recently submitted to the wtr-development list. Bret jensen2525 wrote: > I ran into this issue and have been able to resolve what was causing > this on Windows XP. This maynotbe what's causing it for other folks > but hopefully it will point them in the right direction. > > We have an TeamCity server that will execute our tests using Rake on > the build agents running Windows XP. When my scripts that were > dealing with popups ran on the agents they failed every time with the > same issue described in this thread. > > So what I did was take the simple Google sample and run it in a > Command Prompt on the agent directly and it worked fine. I used the > Command Prompt window and executed my full test case and it ran fine. > I shut down the TeamCity build agent service, and ran their agent > batch files directly (notthe service). I kicked the build off again > and it ran fine this time. > > The problem seemed to be related to the Ruby process executing under > the SYSTEM user account. I stopped running them through the service > and instead as normal batch files in the Startup and they're working > fine now. It seems like there is an issue related to the > @page_container.eval_in_spawned_process when running under this type > of security setup. Make sure whatever process is launching Ruby is > running as a normal user account and see if that resolves the problem. > > Hope this helps. > > On Dec 12 2008, 9:19 am, Bret Pettichord wrote: > >> Your code is correct. There is something about your configuration that >> causes this to fail. >> >> Bret >> >> HAHAHA wrote: >> >>> I have tried, using this code: >>> >>> require 'watir' >>> >>> browser = Watir::IE.new >>> browser.goto('http://www.google.com') >>> browser2 = Watir::IE.attach(:title, /Google/) >>> browser2.text_field(:name, 'q').set('Watir') >>> browser2.button(:name, 'btnG').click_no_wait >>> >>> The click_no_wait still cannot run. Is the code right? >>> >>> On Dec 12, 9:58 am, "larryni...@gmail.com" >>> wrote: >>> Pramod, could you show us an example of your code? On Dec 11, 11:01 pm, "pramod D" wrote: > Hi Michael, > > Initially i also faced same problem when i use Click_no_wait control > was > going but never clicked it, To come around this initially i opened > the IE > (IE7)with blank page and then, i will attach the browser at the start > of the > script and continue to execute my script as usual and worked > correctly. For > time being you can fallow this turn around method. > > Thanks, > Pramod > On Fri, Dec 12, 2008 at 1:46 AM, Michael Hwee > wrote: > >> That is disappointing. >> I believe that is something like OS and/or configuration issues, >> rather >> than watir itself. >> >> Michael >> >> - Original Message >> From: "larryni...@gmail.com" >> To: Watir General >> Sent: Thursday, December 11, 2008 12:00:00 PM >> Subject: [wtr-general] >> Re:button.Click_No_Waitonlyhighlightsthebutton, >> doesnotclick >> >> Sorry, Michael, your code doesn't work either. It opens the page, >> highlightsthebuttonyellow, and then just sits there. No popup is >> ever launched because it doesn't actuallyclickthebutton. Watir >> doesn't report any errors, but it never completes, either. If I >> change click_n
[wtr-general] Re: exists? with multiple identifiers
Got it! require 'test/unit/assertions' include Test::Unit::Assertions get_button_properties(button_name) Case button_name when "Add Dependent" button_id = $ie.div (:id,"TB_ajaxContent").button(:id,"addDependent_submit") end return button_id end #Start of code object_id = get_button_properties("Add Dependent") begin assert(object_id.exists?) puts "object exists" rescue puts "object doesn't exists" 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: Getting each value in excel and converting it while doing it
If you can change the formating of the excel cells were that data is stored to "text" that would probably be the cheapest resolution for you. If you have to change the data once it is already loaded in to ruby there are many options open to you. I recommend changing the spreadsheet --~--~-~--~~~---~--~~ 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] exists? with multiple identifiers
get_button_properties(button_name) Case button_name when "Add Dependent" button_id = $ie.div(:id,"TB_ajaxContent").button (:id,"addDependent_submit") end return button_id end #Start of code object_id = get_button_properties("Add Dependent") if object_id.exists? #Do something end if the first part of the button_id ($ie.div(:id,"TB_ajaxContent")) doesn't exist the object_id.exists? fails "Unable to locate element, using :id,"TB_ajaxContent") Why doesn't the .exists? just return false? What can I do to get around this? Assertion? --~--~-~--~~~---~--~~ 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 enter integer value in a text_field
I've ran into this in the past as well. The only way is to send it as a string --~--~-~--~~~---~--~~ 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 enter integer value in a text_field
Since you want everything as a string (both numbers and strings), why bother with the to_i conversion to get rid of the decimals? I'd just do this: x=w.application.cells(row_count,col_count)['value'] x.to_s.gsub(/\.\d+/, "") # This will remove anything like ".00", ". 12345", etc... and leave you with a string to use in your text field. It won't touch the string matches, like "arc" or "get". Regards, John --~--~-~--~~~---~--~~ 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] unit test load order
Hi All, In order to kick off a unit test from a another file we are requiring that file. To launch a whole suite of tests we require multiple files. It seems that the order that the test run are dependent on the class name. Is there any was to conrtol the order that the test are run with out changing the names of the classes. see example below. require "test1.rb" # class testset_1 require "test2.rb" # class testset_2 require "test3.rb" # class testset_3 require "test4.rb" # class testset_4 require "test5.rb" # class testset_5 require "test6.rb" # class testset_6 require "test7.rb" # class testset_7 require "test8.rb" # class testset_8 require "test9.rb" # class testset_9 require "test10.rb" # class testset_10 require "test11.rb" # class testset_11 require "test12.rb" # class testset_12 The order I require the files in is the order that I would like the test to run in. However, the order seems dependant on class names here is the order that my test run. require "test1.rb" # class testset_1 require "test10.rb" # class testset_10 require "test11.rb" # class testset_11 require "test12.rb" # class testset_12 require "test2.rb" # class testset_2 require "test3.rb" # class testset_3 require "test4.rb" # class testset_4 require "test5.rb" # class testset_5 require "test6.rb" # class testset_6 require "test7.rb" # class testset_7 require "test8.rb" # class testset_8 require "test9.rb" # class testset_9 Without changing the names of the classes or files is there a way to control the test start order --~--~-~--~~~---~--~~ 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] Unable to enter integer value in a text_field
Hi, i am Reading a set of column values from excel sheet and entering into the text_field dynamically ...the column contains both integer and string value. the text field will accept only string values... my values will be lik this 1001 1002 arc get x=w.application.cells(row_count,col_count)['value'] tem=x.to_i# x=1001.0 so i converted float into integer temp=tem.to_s so that i can enter the integer value into text_field as a string.. but the problem is, if i pass string value, x=w.application.cells(row_count,col_count)['value'] tem=x.to_i #this makes tem=0 pl help me to check the value is integer or string? so that i implement the conversion procedure to integer values alone thank u 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] [OT] Is anyone here successfully posting to the Rspec group?
Hi All, Apologies for the OT question, but I cannot seem to get any posts on to the Rspec group @ http://groups.google.com/group/rspec - I've joined the group, start a new post and the topic is reported as posted successfully. However, no trace of my posts exist anywhere on the list/ no mails are sent to my account or spam folder... It just seems I can't post to the list no matter what I do, which is a real problem for me, as I've hit a brick wall with an Rspec issue and can't find any answer to the problem anywhere... Does anyone here post to that list without problems? Thanks. Regards, John --~--~-~--~~~---~--~~ 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: NoMethodError: undefinied method 'goto' for #
There is require 'watir' --- require 'watir' class BrowserFactory def BrowserFactory.create browser = Watir::Browser.new begin browser.speed = :zippy browser.bring_to_front rescue NoMethodError end browser end end end 2009/2/3 aidy lewis : > > #How about this > > require 'watir' > > class Browser > > def initialize >@browser ||= Watir::IE.new >@browser.speed = :zippy >@browser.bring_to_front >@browser.maximize > end > > def close >@browser.close >puts "we have closed the browser" > end > > #watir methods not in Browser fall into here > def method_missing(method_name,*args) >@browser.send(method_name, *args) > end > > end > > browser ||= Browser.new > browser.goto('www.fsf.org') > browser.close > > > #Aidy > On 02/02/2009, ab.ostrow...@gmail.com wrote: >> >> Hi there! >> >> def setup >> @browser = Wayn::BrowserFactory.create >> @user = Wayn::User.new(@browser) >> @user.login('tomcio', 'haslo') >> end >> >> where >> >> class BrowserFactory >> def BrowserFactory.create >> browser = Watir::Browser.new >> >> begin >> browser.speed = :zippy >> browser.bring_to_front >> rescue NoMethodError >> end >> >> browser >> end >> end >> end >> >> I have installed: >> Ruby Version 1.8.6 >> Installer Version 186-27 >> firewatir 1.6.2 >> commonwatir 1.6.2 >> >> I have following error: >> No method error: undefinied method 'goto' for # >> >> I run the same script on another machine and it works therefore I dont >> know whats cousing this error. >> 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: NoMethodError: undefinied method 'goto' for #
#How about this require 'watir' class Browser def initialize @browser ||= Watir::IE.new @browser.speed = :zippy @browser.bring_to_front @browser.maximize end def close @browser.close puts "we have closed the browser" end #watir methods not in Browser fall into here def method_missing(method_name,*args) @browser.send(method_name, *args) end end browser ||= Browser.new browser.goto('www.fsf.org') browser.close #Aidy On 02/02/2009, ab.ostrow...@gmail.com wrote: > > Hi there! > > def setup > @browser = Wayn::BrowserFactory.create > @user = Wayn::User.new(@browser) > @user.login('tomcio', 'haslo') > end > > where > > class BrowserFactory > def BrowserFactory.create > browser = Watir::Browser.new > > begin > browser.speed = :zippy > browser.bring_to_front > rescue NoMethodError > end > > browser > end > end > end > > I have installed: > Ruby Version 1.8.6 > Installer Version 186-27 > firewatir 1.6.2 > commonwatir 1.6.2 > > I have following error: > No method error: undefinied method 'goto' for # > > I run the same script on another machine and it works therefore I dont > know whats cousing this error. > 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: NoMethodError: undefinied method 'goto' for #
Yes, sure Loaded suite All Tests Started EE Finished in 0h 0m 0s 1) Error: test_send_public_gift(TC_Send_Private_Gift): NoMethodError: undefined method `goto' for # C:\Documents and Settings\anna\Desktop\ruby\Gifts/Wayn/user.rb:12:in `login' C:\Documents and Settings\anna\Desktop\ruby\Gifts\PrivateGift.rb:15:in `setu p' 2) Error: test_send_public_gift(TC_Send_Private_Gift): NoMethodError: undefined method `close' for # C:\Documents and Settings\anna\Desktop\ruby\Gifts\PrivateGift.rb:19:in `tear down' 1 tests, 0 assertions, 0 failures, 2 errors 2009/2/2 Bret Pettichord : > > Can you send us a stack trace? > > ab.ostrow...@gmail.com wrote: >> Hi there! >> >> def setup >> @browser = Wayn::BrowserFactory.create >> @user = Wayn::User.new(@browser) >> @user.login('tomcio', 'haslo') >> end >> >> where >> >> class BrowserFactory >> def BrowserFactory.create >> browser = Watir::Browser.new >> >> begin >> browser.speed = :zippy >> browser.bring_to_front >> rescue NoMethodError >> end >> >> browser >> end >> end >> end >> >> I have installed: >> Ruby Version 1.8.6 >> Installer Version 186-27 >> firewatir 1.6.2 >> commonwatir 1.6.2 >> >> I have following error: >> No method error: undefinied method 'goto' for # >> >> I run the same script on another machine and it works therefore I dont >> know whats cousing this error. >> 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] Getting each value in excel and converting it while doing it
Hello, I want to get some values from a range in Excel using WatiR. Here is my range: pnr = worksheet.Range("i2:i4").Value First I wonder how I could remove decimals i.e. convert all these values during the execution of the code above. Using to_i gives me the error that the method does not supprt arrays. Can someone please show me how to iterate the code: pnr = worksheet.Range("i2:i4").Value and converting each value to an int (removing decimals) in some kind of loop. In my case, value (zip code) 0354 is typed into a cell by me, and the cell removes the first 0, but when I print it in Ruby, with 'puts', it yields 354,0. Even better would be how do I iterate over a coloumn to there are no more values left in that spesific coloumn and convert each value to int format? The entire code is pasted below if someone want to try it Cheers! excel = WIN32OLE::new("excel.Application") workbook = excel.Workbooks.Open("C:\\Programfiler\\Ruby\\FPSdata.xls") worksheet = workbook.WorkSheets(1) # Alle variabler blir lagt til egne Array's site = worksheet.Range("a2:a4").Value val = worksheet.Range("b2:b4").Value txt = worksheet.Range("c2:c4").Value fname = worksheet.Range("d2:d4").Value lname = worksheet.Range("e2:e4").Value fodsel = worksheet.Range("f2:f4").Value bnk = worksheet.Range("g2:g4").Value adr = worksheet.Range("h2:h4").Value pnr = worksheet.Range("i2:i4").Value.to_i pstd = worksheet.Range("j2:j4").Value mo = worksheet.Range("k2:k4").Value ep = worksheet.Range("l2:l4").Value valitxt = worksheet.Range("m2:m4").Value workbook.Close excel.Quit ## DATA-DREVET TESTING ## ## Løkke for å gå gjennom arrayen tilsvarende ganger det finnes elementer i arrayen ## count = 0 while count < (val.length) test_site = site[count].to_s val[count] = val[count].to_s.to_i tekst = txt[count].to_s firstname = fname[count].to_s lastname = lname[count].to_s fnr = fodsel[count].to_s bank = bnk[count].to_s adresse = adr[count].to_s postnr = pnr[count].to_s puts postnr le = postnr.length if le == 3 puts " Postnummeret er kun 3 siffer og jeg legger til en 0 foran" trall = postnr trall = '0' + postnr postnr = trall else puts postnr puts " Postnummer starter ikke med 0: " + postnr end poststed = adr[count].to_s mobil = mo[count].to_s epost = ep[count].to_s # Logikken (Bruker en vilkårlig lengde (antall instanser/rader av testdata) på en array som stopping-condition for antall test cases som skal kjøres) ie = Watir::IE.new ie.goto test_site ie.text_field(:name, "trust-121212124878").set val[count].to_s ie.button(:id, "calculatorSubmit").click # Validering if ie.text.include? tekst puts " Test NR. " + (count+1).to_s + " PASSED! Fant string: " + tekst else puts " Test NR. " + (count+1).to_s + " FAILED! Fant ikke string: " + tekst end # Legger inn personopplysninger ie.text_field(:name, "firstName").set firstname ie.text_field(:name, "lastName").set lastname ie.text_field(:name, "nationalIdentificationNumber").set fnr ie.text_field(:name, "bankAccountNumber").set bank ie.text_field(:name, "address").set adresse ie.text_field(:name, "postalCode").set postnr ie.text_field(:name, "postalPlace").set poststed ie.text_field(:name, "mobilePhone").set mobil ie.text_field(:name, "email").set epost ie.text_field(:name, "conformingEmail").set epost ie.button(:name, "action").click ie.close(); count += 1 #inkrementerer med 1 for hver runde kjørt 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 -~--~~~~--~~--~--~---