[wtr-general] Re: ie.contains_text problem

2009-01-23 Thread dara
Using your example HTML, you can verify the contents of the text field with either of the following: assert(ie.text_field(:id, 'ctl140_ctl00_ctl09_txtValue').value == 'FOO') or assert(ie.text_field(:name, 'ctl140$ctl00$ctl09$txtValue').value == 'FOO') You identify the text field by eithe

[wtr-general] Re: Watir on Solaris

2009-01-23 Thread Charley Baker
IE won't run on Solaris that I"m aware of, unless I suppose you run windows emulation with Wine. The jssh extension can be compiled on Solaris and run with Firefox. I don't have a Solaris box anymore, but if you're familiar with it and compiling apps for it, I wouldn't guess it'd be that hard. Rig

[wtr-general] Re: ie.contains_text problem

2009-01-23 Thread Monkeybuns
dara, you are correct. 'FOO' is an entry in a text field, not part of the text of the page. It does not appear in ie.text. When I view the source with FOO in the text field, the following HTML is the part of the source containing FOO: Adjuster NULL On Jan 23, 12:25 pm, dara wrote: > It sou

[wtr-general] Re: Watir on Solaris

2009-01-23 Thread Bret Pettichord
This will require that JSSH (the firefox plug in) be compiled for Solaris. This will allow Watir to test Firefox on Solaris. Bret Tiffany Fodor wrote: > Hi all! > > Just curious if anyone is successfully running Watir on Solaris. I > have a friend who would like to use Watir, but needs to run

[wtr-general] Re: Watir on Solaris

2009-01-23 Thread Tiffany Fodor
Hi Bret! Is compiling JSSH for Solaris on your roadmap or is this something we can/should do on our own? Does this mean that support for IE on Solaris already exists? Thanks! -Tiffany On Jan 23, 12:15 pm, Bret Pettichord wrote: > This will require that JSSH (the firefox plug in) be compiled

[wtr-general] Re: ie.contains_text problem

2009-01-23 Thread Bret Pettichord
Of course you are right. My suggestion was stupid. Please everyone purge it from sight. Bret Michael Hwee wrote: > Or, just get ride of 'assert' and 'contains_text'. > > Just use > > if ie.text.include?("FOO") > puts "FOO found" > else > puts "FOO not found" > end > > Michael > > > > -

[wtr-general] Re: ie.contains_text problem

2009-01-23 Thread Tiffany Fodor
Oops - didn't notice you had the same solution. Good call Michael! ;-) -Tiffany On Jan 23, 10:53 am, Michael Hwee wrote: > Or, just get ride of 'assert' and 'contains_text'. > > Just use > > if ie.text.include?("FOO") >   puts "FOO found" > else >   puts "FOO not found" > end > > Michael > >

[wtr-general] Re: ie.contains_text problem

2009-01-23 Thread Tiffany Fodor
Hi! I typically conditionals like this for text: if ie.text.include?('FOO') puts 'FOO found' else puts 'FOO not found' end Hope this helps! -Tiffany On Jan 23, 7:22 am, Monkeybuns wrote: > The following code returns "FOO not found" even though > "FOO" is present in the output of ie.s

[wtr-general] Re: ie.contains_text problem

2009-01-23 Thread dara
It sounds as though 'FOO' is in your HTML but not in the text of the page. 'FOO' appearing in ie.show_all_objects does not mean it will appear in ie.text. If 'FOO' does not appear in ie.text (try "puts ie.text"), then ie.contains_text('FOO') and ie.text.include?('FOO') are always going to return

[wtr-general] Re: Unable to locate a frame

2009-01-23 Thread Darin Duphorn
Don't you need a attribute value for the frame? ie.frame(:id,"main").link(:text,"Add New").click. -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of malar Sent: Friday, January 23, 2009 1:15 AM To: Watir General Subject: [wtr-ge

[wtr-general] Re: Unable to locate a frame

2009-01-23 Thread Tiffany Fodor
Hi! This is pretty difficult to troubleshoot without more details. What are the differences between your machines? The best way to troubleshoot this yourself would be to use irb. If you haven't used it before, just open a command prompt and type irb. Then you can try various commands on the exi

[wtr-general] Re: ie.contains_text problem

2009-01-23 Thread Michael Hwee
Or, just get ride of 'assert' and 'contains_text'. Just use if ie.text.include?("FOO") puts "FOO found" else puts "FOO not found" end Michael - Original Message From: Bret Pettichord To: watir-general@googlegroups.com Sent: Friday, January 23, 2009 7:05:46 AM Subject: [wtr-gen

[wtr-general] Watir on Solaris

2009-01-23 Thread Tiffany Fodor
Hi all! Just curious if anyone is successfully running Watir on Solaris. I have a friend who would like to use Watir, but needs to run it on Solaris as well as Windows. She only needs to test IE and Firefox, so the browsers are covered. Thanks! -Tiffany --~--~-~--~~~--

[wtr-general] Re: ie.contains_text problem

2009-01-23 Thread Monkeybuns
The only thing that changed in this case was that is not true became is not true. On Jan 23, 9:05 am, Bret Pettichord wrote: > I'm not sure if contains_text returns false or nil when fails to find a > match. Try this instead: > > if assert(ie.contains_text("FOO")) > > > > Monkeybuns w

[wtr-general] Re: Access Denied Error

2009-01-23 Thread LFIdnl
I had the same problem. It reproduce if url of main application and url of frame are not equal. For example, if main url (in address field of browser) is http://localhost/index.html and frame url(src) http://127.0.0.1/frame.html and you wants to get some data from elements which locate in frame yo

[wtr-general] Re: ie.contains_text problem

2009-01-23 Thread Bret Pettichord
I'm not sure if contains_text returns false or nil when fails to find a match. Try this instead: if assert(ie.contains_text("FOO")) Monkeybuns wrote: > The following code returns "FOO not found" even though > "FOO" is present in the output of ie.show_all_objects: > >ie = Watir::IE.attach(

[wtr-general] ie.contains_text problem

2009-01-23 Thread Monkeybuns
The following code returns "FOO not found" even though "FOO" is present in the output of ie.show_all_objects: ie = Watir::IE.attach(:title,"FooBar Report") ie.show_all_objects if assert(ie.contains_text("FOO") != nil) puts "FOO found" else puts "FOO not found" end Seems

[wtr-general] Access Denied Error

2009-01-23 Thread malar b
Hi, i am new to watir. The following code is running properly in one machine. ie.show_frames ie.frame("main").link(:text, "Add New").click if i try to run in another machine, i am getting "Access Denied" and "Unable to Locate a frame named main" errors what is the problem? Can u pl resolve it an

[wtr-general] Re: Issue with using arguments within Open Office (column, row) code

2009-01-23 Thread Alister Scott
This is probably a lot easier if you use Roo. Full details available here: http://roo.rubyforge.org/ An example on how to read OpenOffice here: http://watirmelon.wordpress.com/2009/01/05/watir-and-roo/ The advantage is that you can then switch between excel, OO and GDocs without any code change.