Html codeception CSS路径具有多个同名类
以下代码:Html codeception CSS路径具有多个同名类,html,css,angularjs,codeception,Html,Css,Angularjs,Codeception,以下代码: <div class="row"> <div class=" col-md-4"> <p>Try entering some values for this widget</p> <form class="form-inline ng-valid ng-dirty" role="form"> <p>This widget is outside of a niwa-big-numbe
<div class="row">
<div class=" col-md-4">
<p>Try entering some values for this widget</p>
<form class="form-inline ng-valid ng-dirty" role="form">
<p>This widget is outside of a niwa-big-number-model directive - it should get its values from the form </p>
<div class="big-number content widget green ng-isolate-scope" units="%" value="75" title="Humidity">
<div class="body">
<h1 class="ng-binding">Humidity </h1>
<div class="bigNum ng-binding">
</div>
</div>
</div>
<div class=" col-md-4">
<niwa-big-number-model class="ng-isolate-scope">
<div class="big-number-model"/>
<p class="ng-scope">This widget is fed from a niwa-big-number-model directive</p>
<div class="big-number content widget green ng-scope ng-isolate-scope" units="°C" value="15.5" title="Model Test">
<div class="body">
<h1 class="ng-binding">Model Test </h1>
<div class="bigNum ng-binding">
</div>
</div>
</niwa-big-number-model>
</div>
仍然失败
有人能告诉我title=model test的确切CSS路径吗?根据页面上是否有其他重复标记,有很多方法可以实现这一点。最简单的方法之一是:
.big-number-model h1 {}
.big-number-model .body .ng-binding {}
另一个是:
.big-number-model h1 {}
.big-number-model .body .ng-binding {}
只要找到任何不重复的类,并添加其他嵌套的特殊性(如果需要)