123456789_123456789_123456789_123456789_123456789_

Class: Selenium::WebDriver::Navigation

Relationships & Source Files
Inherits: Object
Defined in: rb/lib/selenium/webdriver/common/navigation.rb

Class Method Summary

Instance Method Summary

  • #back

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

  • #forward

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

  • #refresh

    Refresh the current page.

  • #to(url)

    Navigate to the given URL.

Constructor Details

.new(bridge) ⇒ Navigation

[ GitHub ]

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

def initialize(bridge)
  @bridge = bridge
end

Instance Method Details

#back

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

[ GitHub ]

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

def back
  @bridge.go_back
end

#forward

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

[ GitHub ]

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

def forward
  @bridge.go_forward
end

#refresh

Refresh the current page.

[ GitHub ]

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

def refresh
  @bridge.refresh
end

#to(url)

Navigate to the given URL

[ GitHub ]

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

def to(url)
  @bridge.get url
end