[wtr-general] Re: Access an object

2009-01-14 Thread TCBlues
Thanks a lot. On 14 ene, 03:59, Richard Lawrence rslawre...@gmail.com wrote: You don't get back the specific object type from element_by_xpath, so some methods don't work. But this works: b = Watir::IE.new b.goto 'http://www.google.com/' txt = b.element_by_xpath(//*...@name='q'])

[wtr-general] Re: Access an object

2009-01-14 Thread wesley chen
Thanks very much. I study from you again, :) Thanks. Wesley Chen. On Wed, Jan 14, 2009 at 11:59 AM, Richard Lawrence rslawre...@gmail.comwrote: You don't get back the specific object type from element_by_xpath, so some methods don't work. But this works: b = Watir::IE.new b.goto

[wtr-general] Re: How to store data from a CSV file into an array

2009-01-14 Thread Walter Kruse
Hi Margam You should really read the Ruby documentation on accessing array elements. Nevertheless, here is how I would do it: require 'csv' array = [] CSV::Reader.parse(File.open('gmail.csv')) do |row| array row.join(',') end puts array[10].split(',')[1] # row 11 (column 2) puts

[wtr-general] watir 1.6.2 and extended ascii character representation in Firefox

2009-01-14 Thread bwaybandit
Here is a piece of code that represents the characters (╖Äïσ) properly in IE. require 'win32ole' WIN32OLE.codepage = WIN32OLE::CP_UTF8 browser.text_field(:id, 'blah').value='my characters' In Firefox, the characters in the text field are represented as: 记录阿里巴 巴 The above does not seem like a

[wtr-general] Re: Best Way for Checking Name Fields?

2009-01-14 Thread rob
name_field_with_space = @browser.html.scan(/\sname\s*=\s*[\']\w+\s+ [\']/i) assert(name_field_with_space.empty?, message=name tag field with trailing space found) This was the code I used to solve my problem. I used regex to get the name='whatever '. The scan method will search within the

[wtr-general] running unit tests for watir-1.6.2

2009-01-14 Thread Monkeybuns
I'm trying to run the Unit Tests defined in the watir tutorial (http:// wiki.openqa.org/display/WTR/Run+the+Watir+Unit+Tests). I gather that this does not work anymore in 1.6.2 because the directory structure has changed from 1.5.6. Have others run into this? Are there any suggested

[wtr-general] Re: running unit tests for watir-1.6.2

2009-01-14 Thread Charley Baker
http://wiki.openqa.org/display/WTR/Running+Unit+Tests+in+Development -c On Wed, Jan 14, 2009 at 10:00 AM, Monkeybuns shaml...@twia.org wrote: I'm trying to run the Unit Tests defined in the watir tutorial (http:// wiki.openqa.org/display/WTR/Run+the+Watir+Unit+Tests). I gather that this

[wtr-general] Re: IE hoging memory

2009-01-14 Thread Bret Pettichord
Turn off page caching? Bissquitt wrote: I did find one answer a few pages back but they involved closing IE On Jan 13, 2:47 pm, Bissquitt bissqu...@gmail.com wrote: So im running a script that goes to MANY webpages and I noticed that each web page it goes to it still stores the

[wtr-general] Re: How to create a Hash Table using CSV or FaterCSV

2009-01-14 Thread Karthikeyan Margam
Hi Alex, Thank you very much for the explanation. Margam On Tue, Jan 13, 2009 at 11:39 PM, Alex Collins a.j.collins...@gmail.comwrote: My apologies - knocked send whilst getting onto the train. In this case, you are using the CSV modules to load strings as key/ value pairs into a hash. The

[wtr-general] Re: Authentication Popups

2009-01-14 Thread gem dandy
Amit, This is the method that works for me: *** require 'watir/ie' require 'watir/WindowHelper' require 'test/unit' require 'win32ole' require 'watir\contrib\enabled_popup' # open a browser $ie = Watir::IE.new puts Step

[wtr-general] Test Results output capturing

2009-01-14 Thread Jagdeep Jain
I want to populate Watir results to HTML format. Is there any way to do this? Or is there any way to have all 'puts' goes to HTML file? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post

[wtr-general] Re: Test Results output capturing

2009-01-14 Thread Jagdeep Jain
I got it through Rspec: spec usingrspec.rb --format html testresult.html On Jan 15, 11:31 am, Jagdeep Jain jagdeep.j...@gmail.com wrote: I want to populate Watir results to HTML format. Is there any way to do this? Or is there any way to have all 'puts' goes to HTML file?