Re: [Wtr-general] Javascript Problem....

2006-11-27 Thread Željko Filipin
On 11/25/06, san [EMAIL PROTECTED] wrote: @ Zeljko : Yes, But I Wanted The Whole Process... i.e opening The 1st Page, Entering My Given Data, Then Logging In... In The Background.i.eWhen IE Will Open The Page,I'll Be Already Logged In... Sanju, I do not understand what you want to do. Can

Re: [Wtr-general] activeElement error.

2006-11-27 Thread Željko Filipin
Could you send the code that you use to click that link? Zeljko -- zeljkofilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] A special `method_missing':

2006-11-27 Thread Željko Filipin
On 11/26/06, Allen Zhou [EMAIL PROTECTED] wrote: So what shall I do? Use 'begin..rescue..end' to ignore this exception? If your script works and that exception just bugs you, rescuing it sounds like a good idea. Zeljko -- zeljkofilipin.com ___

[Wtr-general] Can Watir Download .html Pages...?

2006-11-27 Thread san
Look At This Code Please... [i]ie = Watir::IE.new ie.goto('http://www.something.com') ie.text_field(:name, userid1).set(.) ie.text_field(:name, userpass).set(.) ie.image(:src, /login/).click[/i] Now Obviously After The Click A Page Opens. My Question Is, Is It Possible To Save

Re: [Wtr-general] Can Watir Download .html Pages...?

2006-11-27 Thread Željko Filipin
On 11/27/06, san [EMAIL PROTECTED] wrote: Is It Possible To Save The Page As .html ie.html will show you html of the page: Or Is It Possible To Get All The Links In That Page ie.links is array of all links at that page Including Its Own url ie.url will give you url of page -- Zeljko

[Wtr-general] Is there a way to make file_field.set faster?

2006-11-27 Thread Željko Filipin
Is there a way to make file_field.set faster? I have noticed that this is the slowest part of my tests. It takes about 10 seconds to set file field. I have read that it can not be set directly because that would be security issue, but I wonder what I could do to make it faster. I upload

Re: [Wtr-general] Parameterization

2006-11-27 Thread Željko Filipin
I do not know how to use Excel, but this is how you could simplify your code (tested). searches = [pickaxe, Ruby, Watir, Watir and Ruby] searches.each do |search| ie.text_field(:name, q).set(search) ie.button(:name, btnG).click end -- Zeljko Filipin zeljkofilipin.com

Re: [Wtr-general] Can Watir Download .html Pages...?

2006-11-27 Thread san
Thanks [b]Zeljko[/b] But How Can I Save All These Links In An Array Of Strings? Will It Work? webs = ie.links webs.each do |web| puts web end Can You Tell Me From Where Can I Get All These Watir Functions...? Is There Any Good Quality Tutorial?

Re: [Wtr-general] Can Watir Download .html Pages...?

2006-11-27 Thread Željko Filipin
On 11/27/06, san [EMAIL PROTECTED] wrote: Will It Work? webs = ie.links webs.each do |web| puts web end Try it and you will see if it works. :) Can You Tell Me From Where Can I Get All These Watir Functions...? Is There Any Good Quality Tutorial?

Re: [Wtr-general] Can Watir Download .html Pages...?

2006-11-27 Thread san
lol lol :) Ya It Worked... But I can't Open The Links Again by webs = ie.links webs.each do |web| ie.goto(web) # This Line Produces Error... I Also Tried web.to_s output.puts(ie.html) # output is a .html file to be opened in w mode end In Fact I Wanna Save All The Linked html

Re: [Wtr-general] Can Watir Download .html Pages...?

2006-11-27 Thread Željko Filipin
On 11/27/06, san [EMAIL PROTECTED] wrote: Ya It Worked... But I can't Open The Links Again by webs = ie.links webs.each do |web| ie.goto(web) # This Line Produces Error... I Also Tried web.to_s output.puts(ie.html) # output is a .html file to be opened in w mode end If you

Re: [Wtr-general] Parameterization

2006-11-27 Thread jackei
I suggest that you can use CSV or XML rather than Excel, because the Watir's script won't execute if your machines haven't installed Excel. On 11/27/06, Željko Filipin [EMAIL PROTECTED] wrote: I do not know how to use Excel, but this is how you could simplify your code (tested). searches

Re: [Wtr-general] Table has no unique attributes

2006-11-27 Thread Cain, Mark
You could also just use table index. If you do a view source on the page, then do a ctrlf. Beginning at the top of the page, put 'table' (without quotes) into the search field and begin counting by clicking the next button. When you get to desired table that 'count' number is your table index

[Wtr-general] WATIR Bug on Vista

2006-11-27 Thread Wyatt Preul
Whenever I try to run a WATIR script on Vista I encounter the following error, only after a new IE window appears. I believe that it is failing when trying to navigate to a page. Also, I am running the development gem 1.5.1.1100 as you can see in the error message. Started

Re: [Wtr-general] Is there a way to make file_field.set faster?

2006-11-27 Thread Cain, Mark
Zeljko, this works for me and it is much faster because it uses the handle of the object. require 'watir/contrib/enabled_popup' $path = C\:\\watir_bonus\\working\\MyDoc.txt def startClicker( button , waitTime=5, user_input=nil) hwnd = $ie.enabled_popup(waitTime) # get a

Re: [Wtr-general] ie.minimize broken in watir-1.5.1.1127

2006-11-27 Thread Charley Baker
Zeljko, I just ran through the same steps you list below and didn't have a problem. The use of autoit for controlling the window state of ie hasn't changed for quite some time and should be installed as part of your install. Is it working with previous gems on the same machine? -Charley On

Re: [Wtr-general] Is there a way to make file_field.set faster?

2006-11-27 Thread Paul Rogers
you might also try setting focus to the filename field , and then using autoit to set the filename. Zeljko, this works for me and it is much faster because it uses the handle of the object. require 'watir/contrib/enabled_popup' $path = C\:\\watir_bonus\\working\\MyDoc.txt def

Re: [Wtr-general] Can Watir Download .html Pages...?

2006-11-27 Thread Egil Sorensen
And Can You Tell Me Any Other Way To Save .html Pages Intact. Take a look at http://forums.openqa.org/message.jspa?messageID=14044#14044 There is some code that can be used to save the page as rendered. (I believe that ei.html only will give you the page as downloaded.) ~~ Egil

Re: [Wtr-general] Parameterization

2006-11-27 Thread Željko Filipin
On 11/27/06, sikander [EMAIL PROTECTED] wrote: could u expalin me how to do that in detail? -- *From:* [EMAIL PROTECTED]jackei** I suggest that you can use CSV or XML I suggest that you use yaml (http://yaml4r.sourceforge.net/cookbook/). I use it. -- Zeljko

Re: [Wtr-general] WATIR Bug on Vista

2006-11-27 Thread Charley Baker
I don't have access to a Vista system and haven't tried running scripts on it. What scripts are you trying to run and where is the error? Does this happen if you simply open irb and do something like this: irb require 'watir' irb include Watir irb ie = IE.start('http://www.google.com') Or is

Re: [Wtr-general] Can Watir Download .html Pages...?

2006-11-27 Thread Michael Bolton
I think you're looking for wget; Google it. ---Michael B. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of san Sent: November 27, 2006 11:55 AM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] Can Watir Download .html Pages...? It Says That It

Re: [Wtr-general] WATIR Bug on Vista

2006-11-27 Thread Bret Pettichord
To me this looks like a known problem with Watir and Ruby 1.8.5, and unrelated to Vista. I suggest you try Ruby 1.8.2. http://jira.openqa.org/browse/WTR-86 Please let us know if this fixes your problem. Bret Wyatt Preul wrote: Whenever I try to run a WATIR script on Vista I encounter the

Re: [Wtr-general] activeElement error.

2006-11-27 Thread Galina Maralina
Any of the following works to click on the link: $ie.image(:id, popupImage1).click $ie.image(:src, /button_arrows_round/).click $ie.link(:id, ID_OPEN_POPUP1).click The result is the same, right button is flashed when used with .flash and they all open the right window - BUT! Second time, after

[Wtr-general] how to tell when IE is *really* done

2006-11-27 Thread Danny R. Faught
I'm having trouble getting a script to tell me accurately when a page has finished rendering. I'm running Watir 1.4.1 with Ruby 1.8.5 on Windows XP Pro SP2. I'm clicking a link that opens a new browser window, then I attach to the window. The attach returns before the contents of the window are

Re: [Wtr-general] how to tell when IE is *really* done

2006-11-27 Thread Bret Pettichord
I this that this patch might fix this problem: http://jira.openqa.org/browse/WTR-107 I believe that a correct wait procedure needs to check every frame. Bret Danny R. Faught wrote: I'm having trouble getting a script to tell me accurately when a page has finished rendering. I'm running Watir

Re: [Wtr-general] WATIR Bug on Vista

2006-11-27 Thread Wyatt Preul
The fix was found at http://jira.openqa.org/browse/WTR-86 The solution is to copy win32ole.so from C:\ruby\lib\ruby\1.8\i386-mswin32 to C:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.1.1100\watir\win32ole ___ Wtr-general mailing list

[Wtr-general] How do I write to simple file instead of screen?

2006-11-27 Thread Scott
I am new to Watir, and am trying to build a small demo for management. Can someone give me a quick example on replacing 'puts' with the command that writes instead to a file? My DOS window closes immediately upon completion of running a script and I can't see the results. Also, it there a

Re: [Wtr-general] How do I write to simple file instead of screen?

2006-11-27 Thread Scott
Here is what I have so far. It opens the Excel sheet, but doesn't write anything to it. require 'watir' # the watir controller require 'win32ole' # set a variable test_site = 'http://www.google.com' result1 = 'Default' # open the IE browser ie = Watir::IE.new #

Re: [Wtr-general] How do I write to simple file instead of screen?

2006-11-27 Thread lauren
I'm anewbie myself, but I noticed that if I launch my ruby app by double-clicking the icon in windows, the app will execute and close thecmd window. However, if I go to mycmd window first and launch the app from there...then my window stays open and I have a brief history until you close the

Re: [Wtr-general] A special `method_missing':

2006-11-27 Thread Allen Zhou
Sorry for spam. I just found out the same issue as me, it is a defect of Watir. More details please refer the following thread. http://www.mail-archive.com/wtr-general@rubyforge.org/msg05037.html Thanks. - Posted via Jive Forums