如果<div>标签有四个按钮,当使用Selenium WebDriver在<div>标签中没有显示其他按钮时,单击一个按钮

时间:2015-11-17 15:40:17

标签: selenium selenium-webdriver selenium-ide browser-automation

<div>标签中有四个按钮,但一次只显示一个按钮。单击一个按钮后,页面将导航到另一个页面,并显示<div>标记中的另一个按钮。我需要先点击“开始”按钮。为此,我使用了//*[@id='btn-student-start-assignment']

Html代码:

&#13;
&#13;
<div id="student-paper-controls" class="paperControls clearfix">
  <div class="row">
    <div class="col-xs-6">
      <div class="col-xs-6 text-right">
        <button id="ktOnDemandBtn" class="btn btn-primary-alt ktOnDemandClass" style="display:none" type="button" tabindex="0" />
        <button id="stuControlsBackToTasksButton" class="btn btn-default-alt prBackToTaskButtonClass hidden" type="button" tabindex="0">
          < Back to Tasks</button>
            <button id="btn-student-submit-assignment" class="btn btn-student-submit-assignment-cls btn-primary" type="button" tabindex="0">Submit</button>
            <button id="btn-student-start-assignment" class="btn btn-primary-alt" type="button" tabindex="0">Start</button>
            <button id="btn-student-edit-save" class="btn btn-primary-alt" type="button" tabindex="0">Edit / Save As New</button>
      </div>
&#13;
&#13;
&#13;

但它没有用。

0 个答案:

没有答案