[wtr-general] Re: Firewatir and Firefox versions

2009-03-24 Thread Angrez Singh
You can use Firewatir 1.6.2 with both Firefox 2.0.x Firefox 3.x versions. All you need to do is to get the JSSh extension that is compatible with the Firefox version you are using. - Angrez On Tue, Mar 24, 2009 at 3:34 AM, sowmya krish.sow...@gmail.com wrote: I was wondering how many use

[wtr-general] Re: Synchronization Points

2009-03-24 Thread Angrez Singh
You can do two things: 1. Either you can wait for a particular text to appear on the page 2. You can wait for an element to exists or enabled or certain text in text box etc. Have a look here: http://wiki.openqa.org/display/WTR/FAQ#FAQ-HowdoIdealwithtimingissuesandnotusesleep%3F - Angrez On

[wtr-general] Re: Multiple Attributes for Input Elements

2009-03-24 Thread Isabel
Hi Michael, I tried this too require 'watir' ie=Watir::IE.new ie.goto www.google.com ie.text_field(:name = q ,:index = 2).set(xyz) Still I am getting an error. ie.text_field(:name = q ,:index = 1).set(xyz) and ie.text_field(:index = 2).set(xyz) both work fine... On Mar 23, 7:30 am, Michael

[wtr-general] 'click_no_wait' command in Firewatir

2009-03-24 Thread Vijay
Hello people, In yhe following code, require 'watir' Watir::Browser.default = 'firefox' $browser = Watir::Browser.new $browser.goto('www.google.com') $browser.maximize $browser.text_field(:name,'q').set('random') $browser.button(:name,'btnG').click_no_wait the command,

[wtr-general] Re: Test Hangs when choose file window opened

2009-03-24 Thread Željko Filipin
On Tue, Mar 24, 2009 at 09:44, nagmani vm nagman...@gmail.com wrote: It opens the choose file dialog and hangs my system Where did you find that file upload code? Looks like a mess to me. Try this: ie.file_field(:name,uploadFile).set('C:\Documents and Settings\9020\Desktop\A Report On.doc) If

[wtr-general] Re: Multiple Attributes for Input Elements

2009-03-24 Thread Isabel
actually i am trying to create a framework around watir so by default i get the indices for all the elements and then pass the multiple attributes, so i need to work this out with both the attributes... On Mar 24, 1:38 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Tue, Mar 24, 2009

[wtr-general] Re: Test Hangs when choose file window opened

2009-03-24 Thread Shweta
Hi I got the previous code from old posts regarding upload file I have tried with this still its not working same thing it hangs when choose file window opened.I have placed it in C:\ and tried also as well i renamed the file name as AReportOn. code i used is:

[wtr-general] Re: post request

2009-03-24 Thread gtardini
Yes i know i can from ruby but the problem is that in this way the browser is different.. How can I import firefox cookies into, say, mechanize or something like that? Thanks! On 23 Mar, 19:17, aidy lewis aidy.le...@googlemail.com wrote: From Ruby yes

[wtr-general] Re: Test Hangs when choose file window opened

2009-03-24 Thread Shweta
OK Thanks for your quick response On Mar 24, 4:08 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Tue, Mar 24, 2009 at 12:02, Shweta nagman...@gmail.com wrote: Thanks.Its working fine but the choose file window is defaulting to Desktop how to set to C:\ drive I have also

[wtr-general] FCKEditor Help

2009-03-24 Thread Kiran Darekar
Hi there, I am new in Watir and Ruby. We are using FCKeditor. Can anybody tell me, how can I put Text in FCKeditor? Please give an example, Thanks and Regards Kiran | QA Engineer NOTICE: This email message, including any attachments, may contain information that is confidential

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

2009-03-24 Thread Bret Pettichord
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. It works although editor highlights everything after # in ie.link (:text, /#{vb}/).click as comments. Amaizing :-)

[wtr-general] Re: Synchronization Points

2009-03-24 Thread Bret Pettichord
Watir has built in synchronization. Most Watir methods will not return until the page has finished loading. This is invisible and automatic and handles 95% of the synchronization needs of Web Apps. When Watir was first released, there were browser drivers in several different languages. The

[wtr-general] Re: Synchronization Points

2009-03-24 Thread Darin Duphorn
Brett, Within this synchronization, is there a way to handle issues where the page doesn't fully load? (insert a page refresh after a certain time?) We have a situation where if a separate browser maybe opened in IE 7.0 and the automation is running on the an active browser the page doesn't

[wtr-general] Re: Synchronization Points

2009-03-24 Thread Wesley Chen
Suppose there are two browsers, one is ie1, another is ie2, the separate browser. You may achieve it by: ie2.do_something ie2.close ie1.refresh ie1.wait ie1.do_something. Thanks. Wesley Chen. 2009/3/24 Darin Duphorn dduph...@redbrickhealth.com Brett, Within this synchronization, is there

[wtr-general] Re: Multiple Attributes for Input Elements

2009-03-24 Thread Michael Hwee
Hmm, actually think of that, you are right. It should be no matter. But for being good scripter, the index should be always at the end. That is the way I do anyway. Thanks. Michael - Original Message From: Bret Pettichord b...@pettichord.com To: watir-general@googlegroups.com Sent:

[wtr-general] Re: Multiple Attributes for Input Elements

2009-03-24 Thread Michael Hwee
Ok, here is your misunderstanding. For example, if you have: text_field(:index, 20) The index number '20' is for all text_field objects on the page. For example, if you have: text_field(:name='q', :index=20) It does not mean the same text_field object above. It means the index '20' of all

[wtr-general] Re: Maximizng the Browser

2009-03-24 Thread Michael Hwee
'ie' and '$ie' are not the same object. If you use 'ie', you have to follow what Charley said to get your browser maximize. Otherwise, no help. - Original Message From: Isabel joybe...@gmail.com To: Watir General watir-general@googlegroups.com Sent: Tuesday, March 24, 2009 1:13:57

[wtr-general] Re: Synchronization Points

2009-03-24 Thread Aleksey Tyschenko
2009/3/24 Bret Pettichord b...@pettichord.com Watir has built in synchronization. Most Watir methods will not return until the page has finished loading. This is invisible and automatic and handles 95% of the synchronization needs of Web Apps. Is it true for FireWatir too? I need to add

[wtr-general] using a logger with watir loses formatting

2009-03-24 Thread Ruf, Wadud
Hi, I am using a logger to log statements to a file when running watir scripts. The logger has a format specified. However I am experiencing irregular behaviour when I for example call Watir::Simple#new_browser_at() where it loses the format and just outputs the statement. All other statements

[wtr-general] Re: Maximizng the Browser

2009-03-24 Thread Charley Baker
Make sure autoit is registered. Navigate to the directory where autoit lives through the command line and type regsvr32 AutoItX3.dll Autoit is installed with Watir, here's a general idea of where it should live, replace the ruby dir with where ever you have ruby installed: c:\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: Synchronization Points

2009-03-24 Thread Bret Pettichord
You'd need to modify the wait method. Bret Darin Duphorn wrote: Brett, Within this synchronization, is there a way to handle issues where the page doesn't fully load? (insert a page refresh after a certain time?) We have a situation where if a separate browser maybe opened in IE 7.0

[wtr-general] Re: Synchronization Points

2009-03-24 Thread Bret Pettichord
I'm not familiar with how this is handled with FireWatir. Bret al3kc wrote: On Mar 24, 5:03 pm, Bret Pettichord b...@pettichord.com wrote: Watir has built in synchronization. Most Watir methods will not return until the page has finished loading. This is invisible and automatic and

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

2009-03-24 Thread Charley Baker
The command you listed, means you are running a script. Either you already know which script you're running or not. If you're running scripts from a directory then checkout Ruby's Directory and File/FileUtils class. I'm not quite sure what you're trying to solve. Charley Baker blog:

[wtr-general] Re: Synchronization Points

2009-03-24 Thread Darin Duphorn
I'll take a look Thanks, Bret -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of Bret Pettichord Sent: Tuesday, March 24, 2009 2:06 PM To: watir-general@googlegroups.com Subject: [wtr-general] Re: Synchronization Points You'd

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

2009-03-24 Thread Bill Agee
$0 contains the filename being executed, so that should do what you want. For more info on this kind of thing, this page is pretty useful: http://www.zenspider.com/Languages/Ruby/QuickRef.html The Ruby O'Reilly book is also great as a reference for this sort of stuff. Thanks Bill On Tue,

[wtr-general] Re: How can I get Horizontal Position of an element in watir

2009-03-24 Thread marekj
try browser.element.document.currentstyle.position if it returns 'static' the element is in normal flow of DOM and you can't get the other properties. that's why browser.element.document.currentstyle.top returns 'auto' in IE. if it is positioned with css you can get to it with top, width and so on

[wtr-general] assert and rescue question

2009-03-24 Thread watirRookie
hello, I am fairly new to watir and ruby in general. I am trying to automate some web testing that requires to check for the existing of certain html elements. So I am using the following code in my def: # def validate_header_login_page begin assert($ie.div(:id, header).exists?)

[wtr-general] Re: assert and rescue question

2009-03-24 Thread Wesley Chen
begin rescue =e puts e.message puts e.backtrace end Thanks. Wesley Chen. On Wed, Mar 25, 2009 at 4:04 AM, watirRookie ukj...@hotmail.com wrote: hello, I am fairly new to watir and ruby in general. I am trying to automate some web testing that requires to check for the

[wtr-general] Re: firefox error

2009-03-24 Thread Vikas Tulashyam
I dont know .How to install this extension.. On Mar 24, 6:11 pm, Angrez Singh ang...@gmail.com wrote: did you installed JSSh extension? The command that you ran will always be successful whether the extension is there or not. - Angrez On Tue, Mar 24, 2009 at 5:50 PM, Vikas Tulashyam

[wtr-general] FCKEditor Help

2009-03-24 Thread KiranD
Hi there, I am new in Watir and Ruby. We are using FCKeditor. Can anybody tell me, how can I put Text in FCKeditor? Please give an example, Thanks and Regards Kiran | QA Engineer NOTICE: This email message, including any attachments, may contain information that is