How to get the full URL with the current path in Capybara
Try this:
url = URI.parse(current_url)
from capybara session doc:
Fully qualified URL of the current page
def current_url
driver.current_url
end
Path of the current page, without any domain information
def current_path
URI.parse(current_url).path
end
I think that what you are doing is not right