<h3 class="ui-accordion-header ui-helper-reset ui-state-default ui-accordion-header-active ui-corner-top ng-binding ng-scope ui-state-active" ng-click="updateActiveTab($index)" role="tab" ng-class="{'ui-state-active': tabs.active == $index}" ng-if="isUserPermitted($index) && feature.visible" ng-repeat-start="feature in model.features">
<input class="ng-pristine ng-untouched ng-valid" type="checkbox" ng-click="$event.stopPropagation()" style="vertical-align: middle;" ng-change="validateAndUpdateModel($index)" ng-model="ui.featuresEnabled[$index]"/>
AUS - Demand Response Modes (DRM)
<!-- nasty hack to fix line break for validation error messages -->
<!-- ngIf: tabs.active != $index && (feature.label|translate).length >17 -->
<!-- ngIf: tabs.active == $index && (feature.label|translate).length >17 -->
<span class="glyphicon glyphicon-collapse-up ng-scope" style="float: right; vertical-align: middle; margin-right: 4px" ng-if="tabs.active == $index && (feature.label|translate).length >17"/>
<!-- end ngIf: tabs.active == $index && (feature.label|translate).length >17 -->
<!-- ngIf: (feature.label|translate).length >17 -->
<br class="ng-scope" ng-if="(feature.label|translate).length >17"/>
<!-- end ngIf: (feature.label|translate).length >17 -->
<!-- ngIf: showFeatureValidation(feature) -->
<!-- ngIf: !showFeatureValidation(feature) && showDoubleUsageValidation(feature) -->
<!-- ngIf: tabs.active != $index && (feature.label|translate).length <=17 -->
<!-- ngIf: tabs.active == $index&& (feature.label|translate).length <= 17 -->
</h3>
Dies ist der HTML-Code, wo ich meinen XPath brauche. Es enthält eine Checkbox und das Label der CheckBox (AUS - Demand Response Modes (DRM)), im gesamten HTML gibt es mehrere Tags, daher muss ich sicherstellen, dass das ausgewählte Kontrollkästchen das richtige Label enthält - wie in diesem Beispiel die Nachfrage ...XPath-Hilfe erforderlich - Kontrollkästchen auswählen
Was ich versucht, so weit ist:
//*[@role='tab' and contains(text(),'Demand')]//*[@type='checkbox']
Und einige andere Versionen, die meist gleich aussehen, aber ich kann es richtig bekommen zu arbeiten, um es entweder zeigt mir alle Kontrollkästchen aber nicht verknüpft mit dem Label innerhalb des h3-Tags oder gar nicht.
Thx, funktioniert perfekt - auch mit den anderen Knoten –