Re: [Wtr-general] invoking tests in right order

2006-08-21 Thread dzen
lol thanks man that is the solution of my problem. it was real fun to stay and wonder why the hell if i invoke delete class from fulltest and the files are in sane dir it works property and when i invoke save class from fulltest and they are in different dirs it dont works (as i see the

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

2006-08-21 Thread sikander
Hi! Here is the code which I want to call in different Test files def run_check_links(ieHelper) arrayText=[link1,link2,link3] i=0 while i = arrayText.length-1 assert(ieHelper.link(:text, arrayText[i]).exists?) assert(ieHelper.link(:text, arrayText[i]).enabled?)

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

2006-08-21 Thread Dave Hoover
On 8/21/06, sikander [EMAIL PROTECTED] wrote: this method is restricted to check for only 3 specific links. But I want to define array[] as the parameter, and I want to pass any number of links and verify it. This should do it... def run_check_links(ieHelper, *arrayText) for text in

Re: [Wtr-general] Facing difficulty in click event of menus

2006-08-21 Thread Zeljko Filipin
Try:ie.span(:text, View Transactions).flashie.span(:text, View Transactions).clickZeljko ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] problem in opening a file

2006-08-21 Thread Zeljko Filipin
Or you could put path to a variablepath = C:\demo\workbook = excel.Workbooks.Open (#{path}mation.xls)Zeljko ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Divs

2006-08-21 Thread Zeljko Filipin
This is not working for me (only indexes are printed, all ids are empty):irb(main):010:0 ie.goto(http://www.yahoo.com/)= 1.235irb(main):011:0 ie.divs.show index id className12...117118= nilI can see in the source that divs have ids:...div id=pagediv id=ftnav ...On 8/8/06, Bret Pettichord [EMAIL

Re: [Wtr-general] problem in opening a file

2006-08-21 Thread Adam Reed
You know, I had an issue with Excel opening files as well. I was able to set path to a variable and save the file wherever I wanted, but was not able to open this file again using the same variable, or the same path spelled-out. I would get an exception saying unable to find (full path and

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

Re: [Wtr-general] Unicode Support in Watir

2006-08-21 Thread Zeljko Filipin
Maybe this will help (from http://www.testingreflections.com/node/view/3400):Install Ruby 1.8.3. or 1.8.4. and put this at the begging of your script: require win32ole WIN32OLE.codepage = WIN32OLE::CP_UTF8Zeljko ___ Wtr-general mailing list

[Wtr-general] Determining if control is hidden

2006-08-21 Thread tom.dietz
Is there an easy way to determine if a control (a checkbox in my case) is hidden? I have a checkbox that exists in a TD that (through several wrapped divs) ends up being hidden sometimes. Is there an easy way to determine this? Ive tried: if $ie.hidden(:id, control id) and

Re: [Wtr-general] problem in opening a file

2006-08-21 Thread Chris McMahon
Anyway, here is a great guide on Ruby and Excel: http://wiki.rubygarden.org/Ruby/page/show/ScriptingExcel Check out File.expand_path. It's worked on every Windows machine I've used-- except for the laptop I have now. Windows drives me crazy sometimes. -Chris

Re: [Wtr-general] problem in opening a file

2006-08-21 Thread Bret Pettichord
Zeljko Filipin wrote: Or you could put path to a variable path = C:\demo\ workbook = excel.Workbooks.Open (#{path}mation.xls) This won't work. Backslashes inside double-quotes have special meaning. Either use forward slashes or single-quotes (or both) to avoid this problem. Bret

Re: [Wtr-general] problem in opening a file

2006-08-21 Thread Bret Pettichord
Adam Reed wrote: You know, I had an issue with Excel opening files as well. I was able to set path to a variable and save the file wherever I wanted, but was not able to open this file again using the same variable, or the same path spelled-out. I would get an exception saying unable to

Re: [Wtr-general] Solution for accessing showModal Dialogs yet?

2006-08-21 Thread Bret Pettichord
James wrote: I should note, this script will work just fine, if it happens that two dialogs are not attempted to be opened simultaneously. Once this happens, the process hangs. If the opening and closing of modal dialogs occurs sequentially, no problem. but simultaneously won't work for me.

Re: [Wtr-general] Setting Textbox throws unknown method 'scrollIntoView' error

2006-08-21 Thread Bret Pettichord
WIN32OLERuntimeError: Unknown property or method `scrollIntoView' HRESULT error code:0x80010004 The caller is dispatching an asynchronous call and cannot make an outgoing call on behalf of this call. C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1065/./watir.rb:3829:in

Re: [Wtr-general] problem in opening a file

2006-08-21 Thread Jeff Wood
Bret Pettichord wrote: Zeljko Filipin wrote: Or you could put path to a variable path = "C:\demo\" workbook = excel.Workbooks.Open ("#{path}mation.xls") This won't work. Backslashes inside double-quotes have special meaning. Either use forward slashes or single-quotes

[Wtr-general] Brainstorming around pasword popups and other popups - Ruby Watir

2006-08-21 Thread Jezechiel
Hello, I am a beginner with Watir, right now using 1.5.1.1065. And I still cannot make the code work for closing password popups or certificate alert popup (meaning clicking on the OK button). So here is what I can give you, I have put together all the different scripts/solutions possible,

Re: [Wtr-general] launch broswer as another user ?

2006-08-21 Thread Bret Pettichord
Marco wrote: Hi has anyone had to come up with a way of launching an instance of ie from within a script but run as another user context? I tried using cpau and I can launch a browser using a ruby script. I then run that script using cpau -u user -p password -ex cmd /K

[Wtr-general] Submitting a form with multiple submit buttons

2006-08-21 Thread tom.dietz
I have a form with two submit buttons: input type=submit value=Cancel \ input type=submit value=Save \ I cant seem to access these with the Watir Button class and if I use form.submit, it always executes the Cancel command above. Any ideas?

Re: [Wtr-general] Setting Textbox throws unknown

2006-08-21 Thread James
There are definately problems with the IE functions text_field, button, etc I have had to change my scripts to not use Regexes in these functions in order to keep them working in 1.5.x =[ Below, actually did set the text_field. However, it then threw this error, and crashed IE

Re: [Wtr-general] Submitting a form with multiple submit buttons

2006-08-21 Thread Dave Hoover
On 8/21/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have a form with two submit buttons: input type=submit value=Cancel \ input type=submit value=Save \ I can't seem to access these with the Watir Button class and if I use form.submit, it always executes the 'Cancel' command above.

Re: [Wtr-general] Setting Textbox throws unknown method 'scrollIntoView' error

2006-08-21 Thread James
Bug WTR-89 opened in JIRA - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=3607messageID=10228#10228 ___ Wtr-general mailing list Wtr-general@rubyforge.org

Re: [Wtr-general] Solution for accessing showModal Dialogs yet?

2006-08-21 Thread James
Bug WTR-88 opened in JIRA - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=3606messageID=10229#10229 ___ Wtr-general mailing list Wtr-general@rubyforge.org

[Wtr-general] Subject:,Re: launch broswer as another user ?

2006-08-21 Thread Lonny Eachus
Wow. Seems like an awful lot of work. Why not just use shell to start IE as any user you want using the Windows "RunAs" command, then attach to the window? Two short lines of code. Lonny Eachus == Subject: Re: [Wtr-general] launch broswer as

Re: [Wtr-general] Subject:,Re: launch broswer as another user ?

2006-08-21 Thread Bret Pettichord
Lonny Eachus wrote: Wow. Seems like an awful lot of work. Why not just use shell to start IE as any user you want using the Windows RunAs command, then attach to the window? Two short lines of code. In my case i needed to start up several browsers concurrently and in this scenario, the only

Re: [Wtr-general] Setting Textbox throws unknown

2006-08-21 Thread Bret Pettichord
James wrote: I have no trouble reproducing this. Also...Doing so, crashes IE I believe you. But we don't yet have a good description of the problem. Before we can start to fix the problem we need to be able to have other people reproduce the problem. You've said that any use of Regexps