changing selenium domain/subdomain within cucumber scenarios -


so, have rails webapp utilizes subdomains separating admin functionality public functionality using subdomain-fu. there functionality(that want test!) contained within 2 urls(eg admin.example.com , www.example.com). want scenarios run against admin domain, , against www domain.

my problem cant figure out how change domain selenium uses @ time after startup. can put in env.rb:

webrat.configure |config|   config.mode = :selenium   config.application_address = "admin.example.com" end 

and work, scenarios need admin domain. if try like:

host! "www.example.com" 

inside steps, seems ignored selenium, goes on using "admin.example.com"

any ideas? or if not possible, ideas workaround?

i haven't got working using webrat cabybara following works me.

given /^i visit subdomain "(.+)"$/ |sub|   # host! "#{sub}.example.com" #for webrat   capybara.default_host = "#{sub}.example.com" #for rack::test   capybara.app_host = "http://#{sub}.example.com:9887" if capybara.current_driver == :selenium    ################################################################################   # far know, have put {sub}.example.com entries you're   # using in /etc/hosts file culerity tests. didn't seem   # required rack::test   ################################################################################ end 

Comments

Popular posts from this blog

Delphi Wmi Query on a Remote Machine -