Skip to content

Commit b87a463

Browse files
authored
Merge pull request #162 from alexanderadam/chores/fix-missing-documentation-renames
fix missing documentation renames of #goto -> #go_to
2 parents cdedec3 + 1d8bf83 commit b87a463

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ Ferrum::Browser.new(options)
184184

185185
## Navigation
186186

187-
#### goto(url) : `String`
187+
#### go_to(url) : `String`
188188

189189
Navigate page to.
190190

@@ -959,13 +959,13 @@ context = browser.contexts.create
959959

960960
t1 = Thread.new(context) do |c|
961961
page = c.create_page
962-
page.goto("https://www.google.com/search?q=Ruby+headless+driver+for+Capybara")
962+
page.go_to("https://www.google.com/search?q=Ruby+headless+driver+for+Capybara")
963963
page.screenshot(path: "t1.png")
964964
end
965965

966966
t2 = Thread.new(context) do |c|
967967
page = c.create_page
968-
page.goto("https://www.google.com/search?q=Ruby+static+typing")
968+
page.go_to("https://www.google.com/search?q=Ruby+static+typing")
969969
page.screenshot(path: "t2.png")
970970
end
971971

@@ -984,15 +984,15 @@ browser = Ferrum::Browser.new
984984
t1 = Thread.new(browser) do |b|
985985
context = b.contexts.create
986986
page = context.create_page
987-
page.goto("https://www.google.com/search?q=Ruby+headless+driver+for+Capybara")
987+
page.go_to("https://www.google.com/search?q=Ruby+headless+driver+for+Capybara")
988988
page.screenshot(path: "t1.png")
989989
context.dispose
990990
end
991991

992992
t2 = Thread.new(browser) do |b|
993993
context = b.contexts.create
994994
page = context.create_page
995-
page.goto("https://www.google.com/search?q=Ruby+static+typing")
995+
page.go_to("https://www.google.com/search?q=Ruby+static+typing")
996996
page.screenshot(path: "t2.png")
997997
context.dispose
998998
end

lib/ferrum/page.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def combine_url!(url_or_path)
268268
nil_or_relative = url.nil? || url.relative?
269269

270270
if nil_or_relative && !@browser.base_url
271-
raise "Set :base_url browser's option or use absolute url in `goto`, you passed: #{url_or_path}"
271+
raise "Set :base_url browser's option or use absolute url in `go_to`, you passed: #{url_or_path}"
272272
end
273273

274274
(nil_or_relative ? @browser.base_url.join(url.to_s) : url).to_s

0 commit comments

Comments
 (0)