Class: Selenium::WebDriver::Navigation

Inherits:
Object
  • Object
show all
Defined in:
lib/selenium/webdriver/common/navigation.rb

Instance Method Summary collapse

Constructor Details

#initialize(bridge) ⇒ Navigation

Returns a new instance of Navigation.



22
23
24
# File 'lib/selenium/webdriver/common/navigation.rb', line 22

def initialize(bridge)
  @bridge = bridge
end

Instance Method Details

#backObject

Move back a single entry in the browser’s history.



38
39
40
# File 'lib/selenium/webdriver/common/navigation.rb', line 38

def back
  @bridge.goBack
end

#forwardObject

Move forward a single entry in the browser’s history.



46
47
48
# File 'lib/selenium/webdriver/common/navigation.rb', line 46

def forward
  @bridge.goForward
end

#refreshObject

Refresh the current page.



54
55
56
# File 'lib/selenium/webdriver/common/navigation.rb', line 54

def refresh
  @bridge.refresh
end

#to(url) ⇒ Object

Navigate to the given URL



30
31
32
# File 'lib/selenium/webdriver/common/navigation.rb', line 30

def to(url)
  @bridge.get url
end