diff --git a/lib/webrat/mechanize.rb b/lib/webrat/mechanize.rb index 1bdcb90..41296cf 100644 --- a/lib/webrat/mechanize.rb +++ b/lib/webrat/mechanize.rb @@ -67,7 +67,7 @@ module Webrat #:nodoc: else current_path.split("/")[0..(-1 - levels_up)].join("/") end - descendent = url.split("/")[levels_up..-1] + descendent = url.split("/")[levels_up..-1].join "#{ancestor}/#{descendent}" end end