[wtr-general] How to get info by Watir script from page source?

2009-06-08 Thread Wesley Chen
Hi, Guys, I turn to one of the page in my system, view the page source, it displays: *!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; !-- server01 -- html xmlns=http://www.w3.org/1999/xhtml; xmlns:v=urn:schemas-microsoft-com:vml head

[wtr-general] How using Watir do Basic Authentication in Linux platform

2009-06-08 Thread Frank Lin
Watir's tutorial list some example that using autoit to do basic authentication, but autoit only work in Windows platform, for it using some OLE schematic, Now I need using watir do basic authentication in Linux platform, I know maybe using WINE is a slove way, but I do not like too many

[wtr-general] Re: How to get info by Watir script from page source?

2009-06-08 Thread jason
how about... ie.html.match(/head.+?\/head/)[0] jason On 8 Jun., 08:35, Wesley Chen cjq@gmail.com wrote: Hi, Guys, I turn to one of the page in my system, view the page source, it displays: *!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN

[wtr-general] Re: WatirCraft LLC is closing

2009-06-08 Thread Jarmo Pertman
On Jun 8, 3:52 am, marekj marekj@gmail.com wrote: Bummer, bummeroon.. These last 12 months have not been easy in American economy. Only for American economy? I would say that the whole world is in this economy crisis :) But I would also like to say big thanks to Bret and everyone who has

[wtr-general] Re: How to get info by Watir script from page source?

2009-06-08 Thread Wesley Chen
Thank you, Jason, it works. I just think may be a method like * ie.document.body.getHead* or something else. Have you got any other suggestion about another question? :) Thanks. Wesley Chen. 2009/6/8 jason jason.franklin.sto...@gmail.com how about... ie.html.match(/head.+?\/head/)[0]

[wtr-general] Re: How to get info by Watir script from page source?

2009-06-08 Thread Jonny Xu
Hi Wesley, Hope this is what you want. http://www.rhinocerus.net/forum/lang-ruby/562943-html-method-watir-dont-retu rn-real-html.html Best Regards, Jonny From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of Wesley Chen Sent: 2009年6月8日 14:36 To:

[wtr-general] Re: How to get info by Watir script from page source?

2009-06-08 Thread Wesley Chen
Hi, Jason, Thank you very much, it works. But really complex. Thanks. Wesley Chen. 2009/6/8 Jonny Xu jonn...@hotmail.com Hi Wesley, Hope this is what you want. http://www.rhinocerus.net/forum/lang-ruby/562943-html-method-watir-dont-return-real-html.html Best Regards, Jonny

[wtr-general] Re: .set method is not working for firefox

2009-06-08 Thread kiran yajamanyam
Hi All, My test case scenario is go to webmail.aol.com site and there I need to enter username and password in the text fields. Please let me know if I need to include any other code or update any other class? Regards, Kiran Y On Thu, Jun 4, 2009 at 9:22 PM, SANTOSH SOLAPURKAR

[wtr-general] Re: How to get info by Watir script from page source?

2009-06-08 Thread jason
Hi Wesley. Only browser, window, document and body are defined vars. There seem to be absolutly not methods that can be applied to the head tag of a document (at least in firewatir). Maybe a work around for you would be to send the html to the hpricot parser and use that to parse out stuff you

[wtr-general] Re: .set method is not working for firefox

2009-06-08 Thread jason
Hi Kiran, works fine for the url you provide: ff.form(:name, AOLLoginForm).text_field(:id ,lgnId1).set(Hello World) best R Jason. On 4 Jun., 17:14, jason jason.franklin.sto...@gmail.com wrote: Hi Krian, I have just tried this out for you which works - so sorry - i cant reproduce the

[wtr-general] Re: .set method is not working for firefox

2009-06-08 Thread kiran yajamanyam
Hii Jason, I tried with the same piece of code and I am still getting the same error. Is it possible for you to send firewatir folder which you are using so that i can try with the same files. I have updated firewatir gem as well. Thanks and Regards, Kiran Y On Mon, Jun 8, 2009 at 3:22 PM,

[wtr-general] Re: .set method is not working for firefox

2009-06-08 Thread jason
can you post the entier error message you are getting On 8 Jun., 12:03, kiran yajamanyam kiranyajaman...@gmail.com wrote: Hii Jason, I tried with the same piece of code and I am still getting the same error. Is it possible for you to send firewatir folder which you are using so that i can

[wtr-general] Re: .set method is not working for firefox

2009-06-08 Thread kiran yajamanyam
Hi Jason, Following is the error I am getting. *Error: SystemStackError: stack level too deep C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:507:in `read_socket' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:445:in `js_eval'

[wtr-general] Multiple lines in textarea

2009-06-08 Thread grzegorz.smaj...@gmail.com
Hi, I face a problem with putting answers in textarea in new lines ex: I have a textarea: textarea name=multiChoiceAnswers rows=5 style=width:100% align=left I would like to put into that textarea answers in each line: [Answer1] [Answer2] [Answer3] When I create an array with answers:

[wtr-general] Re: Multiple lines in textarea

2009-06-08 Thread jason
Your code is wrong - line is using puts ??? ie.textfield(:name, multiChoiceAnswers).set(answers.each do |item| puts item end) change to ie.textfield(:name, multiChoiceAnswers).set(answers.each do |item| item + \n ) Best R Jason On 8 Jun., 12:46, grzegorz.smaj...@gmail.com

[wtr-general] Re: Multiple lines in textarea

2009-06-08 Thread jason
Oh and your text array should look as follows: answers = [answer1,answer2,answer3] On 8 Jun., 13:13, jason jason.franklin.sto...@gmail.com wrote: Your code is wrong - line is using puts ??? ie.textfield(:name, multiChoiceAnswers).set(answers.each do |item| puts item end) change to

[wtr-general] Re: Multiple lines in textarea

2009-06-08 Thread sfistak
Thx for help but still same problem. I have fixed your advices: irb(main):112:0 answers = [answer1, answer2, answer3] = [answer1, answer2, answer3] irb(main):113:0 ie.text_field(:name, multiChoiceAnswers).set (answers.each do |item| item + \n end) ArgumentError: comparison of String with 128

[wtr-general] Can't Click Div element

2009-06-08 Thread Chethan
HI, How to Click on this div image or text element View more details Here is the following code /ul /div /div div class=collapseDiv div class=cap_moreDetails collapseHeader img class=collapseImg src=themes/leadforce1/images/expand.gif/ div class=collapseHeaderTextView More Details .../div

[wtr-general] Re: Multiple lines in textarea

2009-06-08 Thread Željko Filipin
Try this: answers.each do |item| ie.textfield(:name, multiChoiceAnswers).set item end Željko -- http://watirpodcast.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this

[wtr-general] Re: Can't Click Div element

2009-06-08 Thread Željko Filipin
On Mon, Jun 8, 2009 at 1:48 PM, Chethan chethan2...@gmail.com wrote: img class=collapseImg src=themes/leadforce1/images/expand.gif/ browser.image(:src, /expand/).click div class=collapseHeaderTextView More Details .../div browser.div(:text, View More Details ...).click Željko --

[wtr-general] Re: Multiple lines in textarea

2009-06-08 Thread sfistak
This enters each value and deletes previous one. So I whats left in textfield is only Answer3. Thx GS On Jun 8, 1:49 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: Try this: answers.each do |item|     ie.textfield(:name, multiChoiceAnswers).set item end Željko

[wtr-general] Re: Multiple lines in textarea

2009-06-08 Thread Željko Filipin
And what happens if you do this? ie.textfield(:name, multiChoiceAnswers).set Answer1\nAnswer2\nAnswer3 Željko --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email

[wtr-general] Re: How to get the element attributes in the frame?

2009-06-08 Thread jason
try somthing like ie.frame(:index, 1).form(:name, q).getAttribute(autocomplete) Jason On 8 Jun., 14:07, Wesley Chen cjq@gmail.com wrote: Hi, guys, By the following code, I can get google search text field's autocomplete attribute value. *require 'watir'

[wtr-general] Re: How to send the email by Ruby script?

2009-06-08 Thread Wesley Chen
Mailfactory works great, it can send the attachments freely. http://mailfactory.rubyforge.org/ Thanks. Wesley Chen. On Sun, Jun 7, 2009 at 5:56 PM, tknv rreedd...@gmail.com wrote: Hello et.,al. I think this blog is help attach file. Example use Gmail:SMTP.

[wtr-general] Re: How to get the element attributes in the frame?

2009-06-08 Thread Wesley Chen
Hi, Jason, Thank you for your quick reply. Are you sure the form has getAttribute method? When I try: puts ie.form(:name, q).getAttribute(autocomplete) I get error message: F:/Jython Project/RubyTest/lib/attach_ment.rb:4: undefined method `getAttribute' for #Watir::Form:0x3530fcc (NoMethodError)

[wtr-general] Re: How to get the element attributes in the frame?

2009-06-08 Thread jason
sorry - ok course it does not. puts ie.frame(:index, 1).form(:name, q).id puts ie.frame(:index, 1).form(:name, q).text_field(:name, autocomplete ).inspect puts ie.frame(:index, 1).form(:name, q).text_field(:name, autocomplete ).id puts ie.frame(:index, 1).form(:name, q).text_field(:name,

[wtr-general] Office 2007 - Excel

2009-06-08 Thread Darryl (gem dandy) Brown
We have developed several data driven Watir tests using Excel in Office 2003 as the data store. Has anyone else migrated to Office 2007? I'm about to upgrade but thought I'd try to get some feedback from other people who have done this already (?? I hope) Thanks, Darryl Brown

[wtr-general] Re: Office 2007 - Excel

2009-06-08 Thread Darin Duphorn
Shouldn't be a problem. -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of Darryl (gem dandy) Brown Sent: Monday, June 08, 2009 8:41 AM To: Watir General Subject: [wtr-general] Office 2007 - Excel We have developed several

[wtr-general] Re: currentstyle not working in firefox

2009-06-08 Thread Loft_Tester
OK, I tried working on this for sometime but I haven't come up with anything that works. I think my problem is that I am not familiar with jssh command language and how it works. maybe if I get some help with one conversion I'll be able to do the rest on my own. I have this field

[wtr-general] Re: Office 2007 - Excel

2009-06-08 Thread Loft_Tester
we have been running in compatibility mode on for office 2003 on our test machines that seems to working fine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to

[wtr-general] Re: Can't Click Div element

2009-06-08 Thread Chuck van der Linden
On Jun 8, 4:51 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Mon, Jun 8, 2009 at 1:48 PM, Chethan chethan2...@gmail.com wrote: img class=collapseImg src=themes/leadforce1/images/expand.gif/ browser.image(:src, /expand/).click div class=collapseHeaderTextView More Details

[wtr-general] Re: Changing Div Location Without Puts

2009-06-08 Thread Win
Jason, Thanks for the tips. Indeed, this is a timing issue. I've tracked down to the place where the last code made a click on the div and added sleep 2 (sleep 1 not long enough, so I used sleep 2). It works totally now. Thanks again, Winata On Jun 7, 1:26 am, jason

[wtr-general] Using Excel Files?

2009-06-08 Thread Juston
Hey, I'm a Java/C++ programmer and a Ruby noob and I'm getting ready to build a testing application that would use Watir to test a set of web applications. As there are about 6 applications with similar interfaces but different behavior I'd like to recycle as much code as possible. The

[wtr-general] Re: Using Excel Files?

2009-06-08 Thread Charley Baker
If you're looking at an Excel driven framework, then I'd suggest taking a look at Rasta: http://rubyforge.org/projects/rasta/ I've not used it, but it's certainly best of class for working with Excel and Watir. Charley Baker blog: http://blog.charleybaker.org/ Lead Developer, Watir,

[wtr-general] Anyone have Firewatir jssh plugin working on Mac PPC Tiger?

2009-06-08 Thread Bean Rider
On firewatir forums someone said: '...the plugin works well for INTEL macs...It can't be used on PPC macs.' http://code.google.com/p/firewatir/issues/detail?id=35#c10 I'm hoping the issue is not a lost cause on Mac PowerPC Tiger, since folks with Mac Intel Leopard OSX also have the issue. The

[wtr-general] Re: Using Excel Files?

2009-06-08 Thread Loft_Tester
In our tests we just read data from these excel spreadsheets then we use that data to drive our testcases. There is file out there called xls.rb, that reads from an excel spreadsheet. we use this library to do all of our reading. On Jun 8, 12:59 pm, Charley Baker charley.ba...@gmail.com wrote:

[wtr-general] Re: currentstyle not working in firefox

2009-06-08 Thread Loft_Tester
Is there another workaround for this? Thanks On Jun 8, 10:38 am, Loft_Tester aaronr...@gmail.com wrote: OK, I tried working on this for sometime but I haven't come up with anything that works.  I think my problem is that I am not familiar with jssh command language and how it works.  maybe if

[wtr-general] Re: Using Excel Files?

2009-06-08 Thread Juston
That actually makes a lot of sense for storing data. I misunderstood what I was reading, it sounded like people were driving their run-time behavior out of excel. I guess on that note its pretty safe to assume most people kind of Hard-Code their test procedure into the logic of the program and

[wtr-general] Re: Towards migrating to Watir.com

2009-06-08 Thread Bret Pettichord
Let me chime in by trying to restate the problem and why this idea got started in the first place. 1. The current home page for Watir (at wtr.rubyforge.com) is hard for the community to update. It is a webgen-based website, stored with the Watir code base. Any one with commit rights to Watir

[wtr-general] Re: Using Excel Files?

2009-06-08 Thread Loft_Tester
Excel, for us is used to just supply data for the test. On Jun 8, 2:18 pm, Juston justondav...@gmail.com wrote: That actually makes a lot of sense for storing data. I misunderstood what I was reading, it sounded like people were driving their run-time behavior out of excel. I guess on that

[wtr-general] Getting style information in FireFox

2009-06-08 Thread Loft_Tester
I have a question already posted about using currentstyle in Firefox and the fact that it dosen't work correctly. Is there another way to gather style attributes such as left,top, color and so on. If possible, I would like to do this with out modifying the firewatir files. if there is a

[wtr-general] Re: Towards migrating to Watir.com

2009-06-08 Thread Chuck van der Linden
Thanks for that Bret, it makes it a lot clearer. Would I be correct to presume that given the current options you listed below, which have us remaining at OpenQA, that there is no longer a concern that they will go 'all things Selenium' on us and we'll be forced to suddenly move on short notice?

[wtr-general] Re: Towards migrating to Watir.com

2009-06-08 Thread Bret Pettichord
Chuck van der Linden wrote: Would I be correct to presume that given the current options you listed below, which have us remaining at OpenQA, that there is no longer a concern that they will go 'all things Selenium' on us and we'll be forced to suddenly move on short notice? That is no

[wtr-general] Please help! Can no longer open a Firefox browser...

2009-06-08 Thread George
Hello, I had to get a new hard drive and reinstall Ruby and Watir. I'm pretty sure everything is set up...however, I'm getting a weird error when I attempt to open a Firefox browser. The code: *** require 'watir' Watir::Browser.default = 'firefox' $browser =

[wtr-general] Re: Please help! Can no longer open a Firefox browser...

2009-06-08 Thread Loft_Tester
try the firewatir unit test to see if their stuff runs. Did you install the jssh for your version of firefox? On Jun 8, 4:20 pm, George george.sand...@gmail.com wrote: Hello, I had to get a new hard drive and reinstall Ruby and Watir.  I'm pretty sure everything is set up...however, I'm

[wtr-general] Re: Getting style information in FireFox

2009-06-08 Thread Chuck van der Linden
You had just asked in the other thread if there were workarounds.. so why are you an hour later starting a new thread asking the very same thing? On Jun 8, 11:55 am, Loft_Tester aaronr...@gmail.com wrote: I have a question already posted about using currentstyle in Firefox and the fact that it

[wtr-general] Re: currentstyle not working in firefox

2009-06-08 Thread Chuck van der Linden
have you tried just using the .style method on the specific object? On Jun 8, 11:00 am, Loft_Tester aaronr...@gmail.com wrote: Is there another workaround for this? Thanks On Jun 8, 10:38 am, Loft_Tester aaronr...@gmail.com wrote: OK, I tried working on this for sometime but I haven't

[wtr-general] Re: Please help! Can no longer open a Firefox browser...

2009-06-08 Thread Chuck van der Linden
I would also make sure you have all the proper gem's installed and updated. This sounds similar to some other issues people have had with some win32 related stuff that Watir needs.. If you search the group for Win32 you'll find some threads related to that, might want to peruse them and try

[wtr-general] Re: Please help! Can no longer open a Firefox browser...

2009-06-08 Thread George
Actually, switching to IE worked just fine for me (sorry, I should have mentioned that earlier). Loft_Tester reminded me that I forgot to include the JSSH extension as I was installing everything. It's working just fine now...thanks for the help! -George On Jun 8, 2:25 pm, Chuck van der

[wtr-general] Re: Office 2007 - Excel

2009-06-08 Thread Darryl (gem dandy) Brown
Hello to all, Thanks for replies - just wanted to make sure Excel for Watir would still be OK. Regards, Darryl On Jun 8, 11:31 am, Loft_Tester aaronr...@gmail.com wrote: we have been running in compatibility mode on for office 2003 on our test machines that seems to working fine

[wtr-general] Issue with Select List

2009-06-08 Thread Pallavi Sharma
Hi I have a scenario in which, if i chose a value in a select list, the same value is filled in a text box given by calling an onchange event. code looks like:select name=ABC onChange=onChangeTerm('ABC','XYZ') onfocus=enterField(this) size=1 stype=Selection input decimals=0 elength=3 name=XYZ