最近,我将黄瓜测试从capybara-webkit切换到了chrome。每次我在本地运行测试时,甲板面板中都会出现一个新的chrome图标。但是当我开始新测试时,第5个图标就会消失(例如,我最多看到四个chrome图标)
我用
<div class="product">
<div class="gallery">
<img src="https://via.placeholder.com/300" alt="item" />
</div>
<div class="sidebar">
<h3>
Sidebar
</h3>
<p>
Product price, etc.
</p>
</div>
<div class="description">
<h3>
Details
</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer sed eros sem. Aliquam erat volutpat. Phasellus auctor lorem dolor, vitae egestas neque vestibulum sed. Proin sapien purus, faucibus ut elementum eget, consequat sed arcu. Morbi nisl libero,
molestie eget ligula quis, feugiat iaculis felis. Donec condimentum, felis eu sodales interdum, ex purus convallis augue, quis sollicitudin nibh ex vel lorem. Sed eget semper ipsum, vel dictum lorem. Proin ornare massa elit, non aliquam erat ultricies
at.
</p>
</div>
</div>
.product {
box-sizing: border-box;
position: static;
}
.gallery {
box-sizing: border-box;
float: left;
position: relative;
}
.sidebar {
box-sizing: border-box;
float: right;
position: static;
}
.description {
box-sizing: border-box;
clear: left;
float: left;
position: static;
}
宝石版本:
ChromeDriver 2.43.600229 (3fae4d0cda5334b4f533bede5a4787f7b832d052)
chrome Version 70.0.3538.110 (Official Build) (64-bit)
我的水豚驱动程序已设置:
selenium-webdriver (3.141.0)
capybara (3.11.1)
在无头模式下运行测试时,我看到出现了新的chrome图标,但没有看到浏览器窗口
我该如何解决?