title: select randomly from dropdown list?
body: <p>My html sample code is,</p>
  
  <pre><code> &lt;div class="list"&gt;
      &lt;div class="dropdown"&gt;
          &lt;ul role="menu"&gt;
              &lt;li class="rsbListItem"&gt;one&lt;/li&gt;
              &lt;li class="rsbListItem"&gt;two&lt;/li&gt;
              &lt;li class="rsbListItem"&gt;three&lt;/li&gt;
              &lt;li class="rsbListItem"&gt;four&lt;/li&gt;
              &lt;li class="rsbListItem"&gt;five&lt;/li&gt;
              &lt;li class="rsbListItem"&gt;six&lt;/li&gt;
              &lt;li class="rsbListItem"&gt;seven&lt;/li&gt;
              &lt;li class="rsbListItem"&gt;eight&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>How can i write Selenium scripts for this, and each time when i run it should select randomly.</p>
  
  <p>I have tried to pick random elements,but it's selecting the same element each time. Here is my code.</p>
  
  <pre><code>List&lt;WebElement&gt; options = driver.findElements(By.xpath("//*[@role='menu']"));
  Random rand = new Random();
  int list= rand.nextInt(options.size());
  options.get(list).click();
  </code></pre>