循环下拉列表,每次选择不同的选项

时间:2016-08-18 09:13:53

标签: java selenium-webdriver

我是selenium的新手,我正在尝试编写一个脚本来在网站上创建帐户,每次从特定的下拉列表中选择不同的选项。

以下是网站代码:

<div id="boundlist-1133" class="x-boundlist x-boundlist-floating x-layer x-boundlist-default x-border-box" tabindex="-1" style="right: auto; left: 374px; top: 164px; height: 288px; z-index: 19001;">
 <div id="boundlist-1133-listEl" class="x-boundlist-list-ct x-unselectable" style="overflow: auto; height: 288px;">
  <ul class="x-list-plain">
   <li class="x-boundlist-item x-boundlist-selected" role="option"><none></li>
   <li class="x-boundlist-item" role="option">QA1BILLINGPLAN01</li>
   <li class="x-boundlist-item" role="option">QA1BILLINGPLAN03</li>
   <li class="x-boundlist-item" role="option">QA1BILLINGPLAN04</li>
   <li class="x-boundlist-item" role="option">QA1BILLINGPLAN08</li>
   <li class="x-boundlist-item" role="option">QA1BILLINGPLAN09</li>
   <li class="x-boundlist-item" role="option">QA1BILLINGPLAN10</li>
   <li class="x-boundlist-item" role="option">Standard Mail</li>
   <li class="x-boundlist-item" role="option">Test Billing Plan Weekly AISIUI51</li>
   <li class="x-boundlist-item" role="option">Test Billing Plan Weekly GYUVKE85</li>
   <li class="x-boundlist-item" role="option">Test Billing Plan Weekly QVUDON97</li>
   <li class="x-boundlist-item" role="option">Test Billing Plan Weekly SKNWQI103</li>
   <li class="x-boundlist-item" role="option">Test Billing Plan Weekly SPUZRG6</li>
   <li class="x-boundlist-item" role="option">Test Billing Plan Weekly XUXMMA91</li>
  </ul>
 </div>
</div>

我每次都需要从列表中使用另一个选项。

我用Java编写代码。

0 个答案:

没有答案