mardi 4 août 2015

Cucumber/Capybara tests returning Addressable::URI::InvalidURIError when I visit url

I am unable to visit the following url "http://localhost:7000/login/next=" In my page object i have set the following:

class LoginPage < SitePrism::Page
    set_url "/login/next="

and I have set the following in my env.rb file

Capybara.app_host = "http://localhost:7000"
Capybara.server_host = "localhost"
Capybara.server_port = "7000"

and required the following:

require 'uri'
require 'net/http'
require 'open-uri'

When I run test it get the following

Cannot assemble URI string with ambiguous path: ':7000/login/next='(Addressable::URI::InvalidURIError)

Capybara doesn't like the port/host in the url. Any ideas who to get rounds this please?

Aucun commentaire:

Enregistrer un commentaire