0

below code :

<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>

Task :

I want to find the CSS path to title= Model Test, since in the above code there are multiple class with same name its really difficult to get exact CSS path. What I tried is below :

$I->see('Model Test','.bigNum.body:nth-child(2)');

Still failed Can anyone tell me the exact CSS path to title= model test ?

Jatin
  • 3,065
  • 6
  • 28
  • 42
shab
  • 989
  • 1
  • 15
  • 31

1 Answers1

0

There are many ways to get this, depending on whether there is other repeated markup on your page. One of the simplest would be:

.big-number-model h1 {}

Another would be:

.big-number-model .body .ng-binding {}

Just find any non-repeated classes, and add other nested specificity if needed. Fiddle so you can play around with it.

cjspurgeon
  • 1,497
  • 11
  • 20