Sha256: 3bdae8a159614251d7e9948763fcb9cf1901419512df05132459bf005e2fe56b
Contents?: true
Size: 806 Bytes
Versions: 3
Compression:
Stored size: 806 Bytes
Contents
class TravianBot class Application module Navigation def to_resources_page(selenium) to_page(selenium, 'resources') end def to_village_page(selenium) to_page(selenium, 'village') end def to_map_page(selenium) to_page(selenium, 'map') end def to_stats_page(selenium) to_page(selenium, 'stats') end def to_reports_page(selenium) to_page(selenium, 'reports') end def to_hero_quest_page(selenium) selenium.navigate.to @url + "hero_adventure.php" end private def to_page(selenium, target) link = selenium.find_element(:xpath, "//ul[@id='navigation']/li[@class='#{target}']/a") link.click end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
travian_bot-0.3.0 | lib/travian_bot/application/navigation.rb |
travian_bot-0.2.4 | lib/travian_bot/application/navigation.rb |
travian_bot-0.2.3 | lib/travian_bot/application/navigation.rb |