From bret at pettichord.com Sun Jul 1 17:51:42 2007 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 01 Jul 2007 16:51:42 -0500 Subject: [Wtr-general] Possible to run scripts when not "logged in"? In-Reply-To: <73e7817e0706291618p6c93f99cid1fd8095d9e21bbb@mail.gmail.com> References: <27352721.421183154467476.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <73e7817e0706291618p6c93f99cid1fd8095d9e21bbb@mail.gmail.com> Message-ID: <468821EE.3000803@pettichord.com> Bill Agee wrote: > I believe in most cases, your script will run fine if no Windows user > is logged in. > > However, in my experience, there can be problems with the > Watir::IE.attach method if no one is logged in to the machine. I > believe this is because IE.attach uses the Shell.Application OLE > object, which behaves differently if it's not run from an interactive > user session. Specifically, what I've seen is that attach isn't able > to get a list of open IE windows belonging to the shell unless it's > running as a logged-in user. > > Anyway, as far as I know, all the other Watir methods should work fine > in this case. > This is correct. The IE.attach, IE.new_process, IE.each and ie.modal_dialog methods won't work if run as a service. However, IE.new will. I've updated the rdocs to reflect this. Bret From WKruse at multichoice.co.za Mon Jul 2 01:32:44 2007 From: WKruse at multichoice.co.za (Walter Kruse) Date: Mon, 2 Jul 2007 07:32:44 +0200 Subject: [Wtr-general] how to install Eclipse plugin for ruby ? In-Reply-To: <31659843.3351183090092427.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <31659843.3351183090092427.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: My setup: Eclipse IDE: I use the Platform Runtime Binary (without Java Dev Tools, 33MB) from here: http://europa-mirror1.eclipse.org/eclipse/downloads/drops/R-3.2-20060629 1905/index.php specifically this one: http://europa-mirror1.eclipse.org/eclipse/downloads/drops/R-3.2-20060629 1905/download.php?dropFile=eclipse-platform-3.2-win32.zip RDT: Version 0.9.0 RC 1 from here: http://sourceforge.net/project/showfiles.php?group_id=50233&package_id=4 3880&release_id=502113 Ruby: One click installer: http://rubyforge.org/frs/?group_id=167 This version: ruby 1.8.2 (2004-12-25) [i386-mswin32] The latest Watir development gem from: http://wiki.openqa.org/display/WTR/Development+Builds The instructions: Install Ruby to C:\ruby Unzip the Eclipse file to C:\eclipse Unzip the RDT file to C:\eclipse Run eclipse.exe Configure the Ruby section gem install C:\ruby\watir-*.gem This or a similar setup has been working for me for about 2 years. HTH -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of jieke Sent: 29 June 2007 06:08 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] how to install Eclipse plugin for ruby ? I try to use Eclipse debug ruby program. So I download a plugin named RDT(Ruby Development Tools).But I can't use it.(The RDT download "http://rubyeclipse.sourceforge.net/") I startup Eclipse and click "help/software Updates/find and install/finish" IT register "Network connection problems encountered during search." IT is failed.How can do it? _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ************************************************************************************************************************** Everything in this e-mail and attachments relating to the official business of MultiChoice Africa is proprietary to the company. Any view or opinion expressed in this message may be the view of the individual and should not automatically be ascribed to the company. If you are not the intended recipient, you may not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify the sender immediately by email, facsimile or telephone and destroy the original message. ************************************************************************************************************************** From forum-watir-users at openqa.org Mon Jul 2 06:43:00 2007 From: forum-watir-users at openqa.org (Lavanya Lakshman) Date: Mon, 02 Jul 2007 05:43:00 CDT Subject: [Wtr-general] Unable to click on links with the same text Message-ID: <33570189.2851183373010845.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Following is my sample script : Title of page This is my first homepage. This text is bold Text to be displayed Text to be displayed Now as per Watir syntax, I am trying to click on link 2: # This allows test script to use Watir tool require 'watir' require 'watir/watir_simple.rb' include Watir include Test::Unit::Assertions ie = Watir::IE.attach(:title, "Title of page") ie.link(:text => 'Text to be displayed', :index => 2).click Upon execution, I am getting the following error: c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:963:in `getLink': {:index=>2, :text=>"Te xt to be displayed"} is an unknown way of finding a link ( ) (Watir::Exception::MissingWayOfFindingObjectException) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2830:in `initialize' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:570:in `new' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:570:in `link' from E:/PROVIS/sample.rb:10 From angrez at gmail.com Mon Jul 2 07:06:46 2007 From: angrez at gmail.com (Angrez Singh) Date: Mon, 2 Jul 2007 16:36:46 +0530 Subject: [Wtr-general] Unable to click on links with the same text In-Reply-To: <33570189.2851183373010845.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <33570189.2851183373010845.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Try this: ie.link(:href, "bcd").click - Angrez On 7/2/07, Lavanya Lakshman wrote: > > Following is my sample script : > > > Title of page > > > This is my first homepage. This text is bold > Text to be displayed > Text to be displayed > > > > > Now as per Watir syntax, I am trying to click on link 2: > # This allows test script to use Watir tool > require 'watir' > require 'watir/watir_simple.rb' > include Watir > include Test::Unit::Assertions > ie = Watir::IE.attach(:title, "Title of page") > ie.link(:text => 'Text to be displayed', :index => 2).click > > > Upon execution, I am getting the following error: > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:963:in `getLink': {:index=>2, > :text=>"Te > xt to be displayed"} is an unknown way of finding a link ( ) > (Watir::Exception::MissingWayOfFindingObjectException) > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2830:in `initialize' > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:570:in `new' > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:570:in `link' > from E:/PROVIS/sample.rb:10 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070702/0d32a497/attachment-0001.html From zeljko.filipin at gmail.com Mon Jul 2 11:12:37 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Mon, 2 Jul 2007 17:12:37 +0200 Subject: [Wtr-general] Unable to click on links with the same text In-Reply-To: <33570189.2851183373010845.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <33570189.2851183373010845.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Lavanya, This works for me. What version of Watir are you using? This works only in newer versions. Zeljko -- ZeljkoFilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070702/da54817c/attachment.html From forum-watir-users at openqa.org Mon Jul 2 11:27:29 2007 From: forum-watir-users at openqa.org (Jason) Date: Mon, 02 Jul 2007 10:27:29 CDT Subject: [Wtr-general] CAN BE CLICK LINK ASSOCIATED WITH AN IMAGE In-Reply-To: Message-ID: <27970406.6131183390079643.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> > > ie.text_field(:after?, ie.label(:for, "confirmPassword")).flash > What's :for? It's not part of Watir. Have you tried by :name and/or :id? Fair point. I originally tried it from this page: http://wiki.openqa.org/display/WTR/Methods+supported+by+Element where it states: > label