[wtr-general] Regex question

2009-04-08 Thread vladimir...@hotmail.com
I have a string obj_url = http://crisp.adoc.xerox.com:8080/docushare/dsweb/Get/ Document-77/ and need to extract 77. This code works perfect: handle = /.*Document-(.*)\//.match( obj_url ) puts handle[ 1 ] # returns 77 but this code does not work: obj_type = Document str = '.*' + obj_type

[wtr-general] Re: Regex question

2009-04-08 Thread vladimir...@hotmail.com
Thank you, ANu. It works. On Apr 8, 6:40 pm, ANu Gangavaram anuwri...@gmail.com wrote: When using regular expression with a variable, the syntax is /#{str}/ On Wed, Apr 8, 2009 at 9:30 PM, vladimir...@hotmail.com vladimir...@hotmail.com wrote: I have a string obj_url = http

[wtr-general] Re: WIN32OLE Error

2009-04-02 Thread vladimir...@hotmail.com
, does it work or is it now also broken?. (you are using source control, or at least keeping backups right?) On Apr 2, 8:19 pm, vladimir...@hotmail.com vladimir...@hotmail.com wrote: My Watir scripts worked fine. But after experimenting with Excel files, I'm getting this error. failed

[wtr-general] Path to Ruby scripts

2009-03-31 Thread vladimir...@hotmail.com
I'm running a test set of 2 scripts as system( ruby 'c:/Watir Testware/Scripts/ cm_CreateCollectionAsCPXUser.rb' ) system( ruby 'c:/Watir Testware/Scripts/ dm_AddDocumentWith1Field.rb' ) What environment variable do I need to set up with the script directory in order not typing the script path?

[wtr-general] Cannot click Apply button after using file upload dialog box

2009-03-30 Thread vladimir...@hotmail.com
I need to select a document by clicking Browse... button. After selecting the file for download, I need to click Apply butoon. My code is simple # open Choose File Windows dialog box $ie.file_field( :name, document ).set( c:\\Watir Testware\\Data\ \vb.txt ) $ie.button( :id, applyButton

[wtr-general] Re: Get script name within the script

2009-03-25 Thread vladimir...@hotmail.com
book is also great as a reference for this sort of stuff. Thanks Bill On Tue, Mar 24, 2009 at 12:16 PM, vladimir...@hotmail.com vladimir...@hotmail.com wrote: ARGV allows us to get script's input parameters. Is there a way to extract the script name from the following command: ruby

[wtr-general] Re: Regex in the link's text

2009-03-24 Thread vladimir...@hotmail.com
Thank you, Bret. This syntax is cleaner. On Mar 24, 7:55 am, Bret Pettichord b...@pettichord.com wrote: Another way, that probably won't mess up your editor's highlighting, is this:   ie.link(:text, Regexp.new(#{vb})).click Bret vladimir...@hotmail.com wrote: Thank you, Wesley

[wtr-general] Re: Regex in the link's text

2009-03-23 Thread vladimir...@hotmail.com
:46 PM, vladimir...@hotmail.com vladimir...@hotmail.com wrote: I have a link with the following text: vb (User-44, vb:DocuShare)CPX. It works when I use the statement: ie.link( :text,  /vb/ ).click But for the following code: var = vb ie.link( :text,  /#{var}/ ).click it gives

[wtr-general] Re: Regex in the link's text

2009-03-23 Thread vladimir...@hotmail.com
...@hotmail.com vladimir...@hotmail.com wrote: Thank you, Rich. What you propose has no difference with ie.link( :text,  /vb/ ).click As I wrote, it works. Unfortunately, I cannot use it. I develop a function that has a parameter var. It takes the text that goes into regular

[wtr-general] Synchronization Points

2009-03-23 Thread vladimir...@hotmail.com
In comercial tools, like QuickTest Pro, there are API for synchronization points. You may wait for a certain time while the page is downloded before performing any operations on it. The API ranges from simple wait() to more sophisticated functions waiting for specific object properties. Do we

[wtr-general] Re: Test Set

2009-03-20 Thread vladimir...@hotmail.com
On Mar 19, 5:28 pm, vladimir...@hotmail.com vladimir...@hotmail.com wrote: How to execute multiple functional Watir scripts unattended in a test set? Do I need to use Test::Unit even the test cases are not unit tests? Thanks, Vladimir- Hide quoted text - - Show quoted text

[wtr-general] Re: Getting 'assert_exists': Unable to locate element, using :name, q (Watir::Exception::UnknownObject...

2009-03-19 Thread vladimir...@hotmail.com
...@gmail.com wrote: Hey , Make sure C:\ruby\bin\ruby.exe  invoked as Administrator (if  you are running the script in Vista) Thanks Ravi On Wed, Mar 18, 2009 at 9:56 PM, vladimir...@hotmail.com vladimir...@hotmail.com wrote: It opens Google web site, but does not type anything

[wtr-general] Test Set

2009-03-19 Thread vladimir...@hotmail.com
How to execute multiple functional Watir scripts unattended in a test set? Do I need to use Test::Unit even the test cases are not unit tests? Thanks, Vladimir --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir

[wtr-general] Getting 'assert_exists': Unable to locate element, using :name, q (Watir::Exception::UnknownObject...

2009-03-18 Thread vladimir...@hotmail.com
I was trying to run google_search.rb from tutorial: require 'watir' # set a variable test_site = http://www.google.com; # open the IE browser ie = Watir::IE.new ie.goto test_site ie.text_field(:name, q).set pickaxe # q is the name of the search field Always getting 'assert_exists': Unable

[wtr-general] Re: Getting 'assert_exists': Unable to locate element, using :name, q (Watir::Exception::UnknownObject...

2009-03-18 Thread vladimir...@hotmail.com
? gem list -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of vladimir...@hotmail.com Sent: Wednesday, March 18, 2009 6:42 PM To: Watir General Subject: [wtr-general] Getting 'assert_exists': Unable to locate element, using

[wtr-general] Re: Getting 'assert_exists': Unable to locate element, using :name, q (Watir::Exception::UnknownObject...

2009-03-18 Thread vladimir...@hotmail.com
RUBYOPT Doesn't Exist add it RUBYOPT - Value = -rubygems -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of vladimir...@hotmail.com Sent: Wednesday, March 18, 2009 8:26 PM To: Watir General Subject: [wtr-general] Re: Getting