我正在寻找https://groups.google.com/forum/#!topic/gatling/WIGH_nYw-Mg线程中gatling
内置的东西
我想知道多少列表,即<li> </li>
,在下面的<ul class="product_list grid row">
中呈现的标签?我如何发现5 <li>
个项目是在页面上动态呈现的?
<ul class="product_list grid row">
<li class="ajax_block_product col-xs-12 col-sm-6 col-md-4 first-in-line first-item-of-tablet-line first-item-of-mobile-line" style="height: auto; margin-bottom: 0px;"></li>
<li class="ajax_block_product col-xs-12 col-sm-6 col-md-4 last-item-of-tablet-line" style="height: auto; margin-bottom: 0px;"></li>
<li class="ajax_block_product col-xs-12 col-sm-6 col-md-4 last-in-line first-item-of-tablet-line last-item-of-mobile-line" style="height: auto; margin-bottom: 0px;"></li>
<li class="ajax_block_product col-xs-12 col-sm-6 col-md-4 first-in-line last-line last-item-of-tablet-line first-item-of-mobile-line last-mobile-line"></li>
<li class="ajax_block_product col-xs-12 col-sm-6 col-md-4 last-line first-item-of-tablet-line last-mobile-line">
</ul>
<li>
中提取product_img_link
和product-price
值 <li class="ajax_block_product col-xs-12 col-sm-6 col-md-4 first-in-line first-item-of-tablet-line first-item-of-mobile-line" style="height: auto; margin-bottom: 0px;">
<div class="product-container" itemscope="" itemtype="http://schema.org/Product">
<div class="left-block">
<div class="product-image-container">
<a class="product_img_link" href="http://automationpractice.com/index.php?id_product=3&controller=product" title="Printed Dress" itemprop="url">
<img class="replace-2x img-responsive" src="http://automationpractice.com/img/p/8/8-home_default.jpg" alt="Printed Dress" title="Printed Dress" width="250" height="250" itemprop="image"> </a>
<div class="content_price" itemprop="offers" itemscope="" itemtype="http://schema.org/Offer">
<span itemprop="price" class="price product-price">
$26.00 </span></div>
</div>
</div>
</div> <!-- .product-container> -->
</li>
我在check
以下尝试过,但没有帮助
.check(regex("""<ul class="product_list grid row"> (.*) <!-- .product-container> -->""").findAll.saveAs("""ul_list""")))