[wtr-general] Re: Browser.url does not return proper URL immediately after a browser.goto statement

2009-04-08 Thread Jarmo Pertman
Hi. Actually, it doesn't matter if () or {} is used. You just have to use some non-alpha character - for example, let's say that you want to add elements like {one {two {three then you cannot use %w{}, but it would be wise to use %w() instead. Anyway, here are some examples: irb(main):004:0> %w(

[wtr-general] Re: Browser.url does not return proper URL immediately after a browser.goto statement

2009-03-26 Thread Kevin White
Yep, that was exactly it! I ended up getting a debugger going and found out that my strings had double quotes. I must've misread something when looking up how to do this... Thanks! --Kevin On Mar 26, 11:55 am, George wrote: > This worked for me: > > require 'watir' > Watir::Browser.default = '

[wtr-general] Re: Browser.url does not return proper URL immediately after a browser.goto statement

2009-03-26 Thread George
This worked for me: require 'watir' Watir::Browser.default = 'firefox' browser = Watir::Browser.new sites = %w{www.google.com www.yahoo.com www.microsoft.com} sites.each do |url| puts "going to website: #{url}" browser.goto(url) puts "Browser went to: #{browser.url}" end On Mar 26, 8:

[wtr-general] Re: Browser.url does not return proper URL immediately after a browser.goto statement

2009-03-26 Thread George
Hi Kevin, I did a quick check...I think you just need whitespace, not quotes to separate your data using w{}. You'll also need to use {} instead of (). -George On Mar 26, 8:01 am, Kevin White wrote: > Let me comment on my own post with an example. I might be having a > Ruby problem and not

[wtr-general] Re: Browser.url does not return proper URL immediately after a browser.goto statement

2009-03-26 Thread Kevin White
Let me comment on my own post with an example. I might be having a Ruby problem and not a Watir problem. Here is what I am trying to do: require 'watir' Watir::Browser.default = 'firefox' browser = Watir::Browser.new sites = %w("www.google.com" "www.yahoo.com" "www.microsoft.com") sites.each