title: How can I use pageobject navigation routes when I have multiple methods with parameters?
body: <p>Here, I have two methods in a class with one parameter each and I want to use routes advantage. How can I pass parameters if I am using cucumber I mean how can I pass parameters from step definitions to method if I use like this:</p>
  
  <h2>feature:</h2>
  
  <pre><code>Feature: Github Test Case
  
  Background:
    Given I am on githubpage
  
  Scenario Outline: I should see one of the repositories
    When I click on "&lt;user&gt;" and select "&lt;repo&gt;" link
    Then I should see "Information Technology Association website repo"
  
  Examples:
    | user   | repo        |
    | sample | sample_repo |
  </code></pre>
  
  <h2>step def:</h2>
  
  <pre><code>Given(/^I am on githubpage$/) do
   visit(LoginPage).do_login
  end
  
  Then(/^I should see "([^"]*)"$/) do |message|
    @current_page.text.should include message
  end
  
  
  When(/^I click on "([^"]*)" and select "([^"]*)" link$/) do |user, repo|
   # currently using like this
   navigate_to(GithubPage).click_on(user)
   navigate_to(GithubPage).select_repo(repo)
  
   # but i need like this
   navigate_to(GithubPage).select_repo
  
   # or
   navigate_all
  end
  </code></pre>
  
  <h2>class:</h2>
  
  <pre><code>  class GithubPage
    include PageObject
  
    link(:repo, text: /Repositories/)
  
    def click_on(user)
      span_element(text: "#{user}", index: 1).click
      repo_element.click
    end
  
    def select_repo(repo)
      link_element(xpath: "//a[contains(text(),'#{repo}')]").when_present.click
    end
  end
  </code></pre>
  
  <h2>routes:</h2>
  
  <pre><code>PageObject::PageFactory.routes = {
      :default =&gt; [[GithubPage, :click_on], [GithubPage, :select_repo]]
  }
  </code></pre>