我需要单击一个“用户列表”按钮,并需要选择“li”标记中可用的值。当我单击按钮时,我将获得类似下拉列表值的值。
我尝试使用selectbyvalue、selectbyindex等下拉选项。但是它抛出的错误为“element本应为“select”,但为“span”
<div class="dropbutton-wrapper dropbutton-multiple">
<div class="dropbutton-widget">
<ul class="dropbutton dropbutton--multiple dropbutton--extrasmall">
<li class="dropbutton__item dropbutton__item--extrasmall dropbutton-action"><input class="field-Sum-more-submit button--small button js-form-submit form-submit" data-drupal-selector="edit-field-flexible-below-Sum-more-Sum-more-button-list-view" formnovalidate="formnovalidate" type="submit" id="edit-field-flexible-below-Sum-more-Sum-more-button-list-view" name="field_flexible_below_list_view_Sum_more" value="User List"></li>
<li class="dropbutton-toggle"><button type="button"><span class="dropbutton-arrow"><span class="visually-hidden">List Sumitional actions</span></span></button></li>
<li class="dropbutton__item dropbutton__item--extrasmall dropbutton-action secondary-action"><input class="field-Sum-more-submit button--small button js-form-submit form-submit" data-drupal-selector="edit-field-flexible-below-Sum-more-Sum-more-button-full-text-area" formnovalidate="formnovalidate" type="submit" id="edit-field-flexible-below-Sum-more-Sum-more-button-full-text-area" name="field_flexible_below_full_text_area_Sum_more" value="Sum Full text area"></li>
<li class="dropbutton__item dropbutton__item--extrasmall dropbutton-action secondary-action"><input class="field-Sum-more-submit button--small button js-form-submit form-submit" data-drupal-selector="edit-field-flexible-below-Sum-more-Sum-more-button-linked-image" formnovalidate="formnovalidate" type="submit" id="edit-field-flexible-below-Sum-more-Sum-more-button-linked-image" name="field_flexible_below_linked_image_Sum_more" value="Sum Image"></li>
<li class="dropbutton__item dropbutton__item--extrasmall dropbutton-action secondary-action"><input class="field-Sum-more-submit button--small button js-form-submit form-submit" data-drupal-selector="edit-field-flexible-below-Sum-more-Sum-more-button-video" formnovalidate="formnovalidate" type="submit" id="edit-field-flexible-below-Sum-more-Sum-more-button-video" name="field_flexible_below_video_Sum_more" value="Sum Video"></li>
<li class="dropbutton__item dropbutton__item--extrasmall dropbutton-action secondary-action"><input class="field-Sum-more-submit button--small button js-form-submit form-submit" data-drupal-selector="edit-field-flexible-below-Sum-more-Sum-more-button-image-grid" formnovalidate="formnovalidate" type="submit" id="edit-field-flexible-below-Sum-more-Sum-more-button-image-grid" name="field_flexible_below_image_grid_Sum_more" value="Sum Image grid"></li>
<li class="dropbutton__item dropbutton__item--extrasmall dropbutton-action secondary-action"><input class="field-Sum-more-submit button--small button js-form-submit form-submit" data-drupal-selector="edit-field-flexible-below-Sum-more-Sum-more-button-slideshow" formnovalidate="formnovalidate" type="submit" id="edit-field-flexible-below-Sum-more-Sum-more-button-slideshow" name="field_flexible_below_slideshow_Sum_more" value="Sum Slideshow"></li>
<li class="dropbutton__item dropbutton__item--extrasmall dropbutton-action secondary-action"><input class="field-Sum-more-submit button--small button js-form-submit form-submit" data-drupal-selector="edit-field-flexible-below-Sum-more-Sum-more-button-feed" formnovalidate="formnovalidate" type="submit" id="edit-field-flexible-below-Sum-more-Sum-more-button-feed" name="field_flexible_below_feed_Sum_more" value="Sum Feed"></li>
<li class="dropbutton__item dropbutton__item--extrasmall dropbutton-action secondary-action"><input class="field-Sum-more-submit button--small button js-form-submit form-submit" data-drupal-selector="edit-field-flexible-below-Sum-more-Sum-more-button-list-of-links" formnovalidate="formnovalidate" type="submit" id="edit-field-flexible-below-Sum-more-Sum-more-button-list-of-links" name="field_flexible_below_list_of_links_Sum_more" value="Sum List of links"></li>
<li class="dropbutton__item dropbutton__item--extrasmall dropbutton-action secondary-action"><input class="field-Sum-more-submit button--small button js-form-submit form-submit" data-drupal-selector="edit-field-flexible-below-Sum-more-Sum-more-button-call-to-action" formnovalidate="formnovalidate" type="submit" id="edit-field-flexible-below-Sum-more-Sum-more-button-call-to-action" name="field_flexible_below_call_to_action_Sum_more" value="Sum Call to action (OLD)"></li>
<li class="dropbutton__item dropbutton__item--extrasmall dropbutton-action secondary-action"><input class="field-Sum-more-submit button--small button js-form-submit form-submit" data-drupal-selector="edit-field-flexible-below-Sum-more-Sum-more-button-featured-article" formnovalidate="formnovalidate" type="submit" id="edit-field-flexible-below-Sum-more-Sum-more-button-featured-article" name="field_flexible_below_featured_article_Sum_more" value="Sum Featured article"></li>
<li class="dropbutton__item dropbutton__item--extrasmall dropbutton-action secondary-action"><input class="field-Sum-more-submit button--small button js-form-submit form-submit" data-drupal-selector="edit-field-flexible-below-Sum-more-Sum-more-button-social-link" formnovalidate="formnovalidate" type="submit" id="edit-field-flexible-below-Sum-more-Sum-more-button-social-link" name="field_flexible_below_social_link_Sum_more" value="Sum Social link"></li>
<li class="dropbutton__item dropbutton__item--extrasmall dropbutton-action secondary-action"><input class="field-Sum-more-submit button--small button js-form-submit form-submit" data-drupal-selector="edit-field-flexible-below-Sum-more-Sum-more-button-bio-box" formnovalidate="formnovalidate" type="submit" id="edit-field-flexible-below-Sum-more-Sum-more-button-bio-box" name="field_flexible_below_bio_box_Sum_more" value="Sum Bio box"></li>
<li class="dropbutton__item dropbutton__item--extrasmall dropbutton-action secondary-action"><input class="field-Sum-more-submit button--small button js-form-submit form-submit" data-drupal-selector="edit-field-flexible-below-Sum-more-Sum-more-button-success-story" formnovalidate="formnovalidate" type="submit" id="edit-field-flexible-below-Sum-more-Sum-more-button-success-story" name="field_flexible_below_success_story_Sum_more" value="Sum Success story"></li>
<li class="dropbutton__item dropbutton__item--extrasmall dropbutton-action secondary-action"><input class="field-Sum-more-submit button--small button js-form-submit form-submit" data-drupal-selector="edit-field-flexible-below-Sum-more-Sum-more-button-specification" formnovalidate="formnovalidate" type="submit" id="edit-field-flexible-below-Sum-more-Sum-more-button-specification" name="field_flexible_below_specification_Sum_more" value="Sum Specification"></li>
<li class="dropbutton__item dropbutton__item--extrasmall dropbutton-action secondary-action"><input class="field-Sum-more-submit button--small button js-form-submit form-submit" data-drupal-selector="edit-field-flexible-below-Sum-more-Sum-more-button-widget" formnovalidate="formnovalidate" type="submit" id="edit-field-flexible-below-Sum-more-Sum-more-button-widget" name="field_flexible_below_widget_Sum_more" value="Sum Widget"></li>
<li class="dropbutton__item dropbutton__item--extrasmall dropbutton-action secondary-action"><input class="field-Sum-more-submit button--small button js-form-submit form-submit" data-drupal-selector="edit-field-flexible-below-Sum-more-Sum-more-button-block" formnovalidate="formnovalidate" type="submit" id="edit-field-flexible-below-Sum-more-Sum-more-button-block" name="field_flexible_below_block_Sum_more" value="Sum Block"></li>
<li class="dropbutton__item dropbutton__item--extrasmall dropbutton-action secondary-action"><input class="field-Sum-more-submit button--small button js-form-submit form-submit" data-drupal-selector="edit-field-flexible-below-Sum-more-Sum-more-button-embedded-view" formnovalidate="formnovalidate" type="submit" id="edit-field-flexible-below-Sum-more-Sum-more-button-embedded-view" name="field_flexible_below_embedded_view_Sum_more" value="Sum Embedded view"></li>
<li class="dropbutton__item dropbutton__item--extrasmall dropbutton-action secondary-action"><input class="field-Sum-more-submit button--small button js-form-submit form-submit" data-drupal-selector="edit-field-flexible-below-Sum-more-Sum-more-button-thymeleaf-template" formnovalidate="formnovalidate" type="submit" id="edit-field-flexible-below-Sum-more-Sum-more-button-thymeleaf-template" name="field_flexible_below_thymeleaf_template_Sum_more" value="Sum Thymeleaf Template"></li>
<li class="dropbutton__item dropbutton__item--extrasmall dropbutton-action secondary-action"><input class="field-Sum-more-submit button--small button js-form-submit form-submit" data-drupal-selector="edit-field-flexible-below-Sum-more-Sum-more-button-columns-two" formnovalidate="formnovalidate" type="submit" id="edit-field-flexible-below-Sum-more-Sum-more-button-columns-two" name="field_flexible_below_columns_two_Sum_more" value="Sum Columns"></li>
<li class="dropbutton__item dropbutton__item--extrasmall dropbutton-action secondary-action"><input class="field-Sum-more-submit button--small button js-form-submit form-submit" data-drupal-selector="edit-field-flexible-below-Sum-more-Sum-more-button-audio" formnovalidate="formnovalidate" type="submit" id="edit-field-flexible-below-Sum-more-Sum-more-button-audio" name="field_flexible_below_audio_Sum_more" value="Sum Audio"></li>
</ul>
</div>
</div>
附上的截图供参考
1条答案
按热度按时间hts6caw31#
你试过直接点击他们吗?
像这样单击下拉列表:
然后单击以下任何选项:
进口: