I am trying to capture the label of the Textbox using robot framework and use the label text as variable. Is there any way to do that? The related html code is given below.
<div class="col-xs-6">
<div class="well" style="background-color:white;">
<div class="form-group">
<label for="name_of_phenotype_entering">Please enter your name separated by comma (e.g Last, First)</label>
<input class="form-control" id="name_of_phenotype_entering" name="name_of_phenotype_entering" type="text" value="">
</div>
Thanks for your support.
You can use the following XPATH to locate your
<label>
element://label[@for="name_of_phenotype_entering"]
At this point you can use the Get Text keyword to retrieve the element's text in a variable, like this: