Hello,
Could some one please provide inputs as how could I get the html text using guideBridge api from the below input field
The HTML content for the form is :-
<label class="guideRadio " data-id="2" name="guideContainer-rootPanel" tabindex="0" aria-label="This is label" aria-required="true" aria-checked="false" placeholder="" data-original-title="" title="" role="radio">
<span class="guideRadioInput">
<input type="radio" id="guideContainer-rootPanel-2_widget" data-element-name="radioOption" name="radioOption" value="2" aria-required="true" style="position: relative;" element-name="radioOption" checkthis="test">
</span>
<span class="guideRadioLabel"> This is radio label
<span class="guideRadioCaption">select a caption</span> </span>
</label>
On using the below code :-
let radioOption=guideBridge.resolveNode("radioOption");
1>on doing console .log (radioOption.className) .
It is printing guideRadioButton
2>on doing radioOption.value it gives the value as 2
How to get data for below:-
1> I would want to get the value from the attribute checkthis , how to get it using radioOption??
2>How to get data from other near elements based on class name guideRadioLabel and guideRadioCaption ??
Thanks,
Srinivas
Solved! Go to Solution.
Views
Replies
Total Likes
How to get data for below:-
1> I would want to get the value from the attribute checkthis , how to get it
let radioOption=guideBridge.resolveNode("radioOption");
let checkthisValue = radioOption.checkthis;
2>How to get data from other near elements based on class name guideRadioLabel and guideRadioCaption ??
you can use closest(".className")
try below by passing the property of the element.
var result = guideBridge.getElementProperty({
propertyName: "value",
somExpression: ["somExpression1", "somExpression2"]
});
if (result.errors) {
console.log("some som expressions were invalid");
var err = result.getNextMessage();
while(err != null) {
//err.somExpression will point to the invalid somExpression in the Field.
console.log(err.message);
}
}
for(var i = 0; i< result.data.length; i++) {
console.log(result.data[i]);
}
How to get data for below:-
1> I would want to get the value from the attribute checkthis , how to get it
let radioOption=guideBridge.resolveNode("radioOption");
let checkthisValue = radioOption.checkthis;
2>How to get data from other near elements based on class name guideRadioLabel and guideRadioCaption ??
you can use closest(".className")
Views
Likes
Replies
Views
Likes
Replies