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.



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

def initialize(bridge)
  @bridge = bridge
end

Instance Method Details

#backObject

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



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

def back
  @bridge.go_back
end

#forwardObject

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



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

def forward
  @bridge.go_forward
end

#refreshObject

Refresh the current page.



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

def refresh
  @bridge.refresh
end

#to(url) ⇒ Object

Navigate to the given URL



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

def to(url)
  @bridge.get url
end