Kindly follow the below HTML code. I want to get the text "DefaultBP" in between the tag. If I using this XPath "//div[@class='workspace']//h1
", all the texts including tag such as "Export", "Import", "Tariff List" & "Add Prefix" are displayed. I want only the text "DefaultBP". Hope to hear from you soon.
<div class="container-fluid">
<input type="hidden" name="addressRuleId" id="addressRuleId" value="1"/>
<div class="row text-center">
<h1>DefaultBP
<a href="#" id="exportlink">Export</a>
<input type="hidden" id="status" name="status" value="null">
<input type="hidden" id="bpCode" name="bpCode" value="defaultbp">
<input type="hidden" id="bpName" name="bpName" value="DefaultBP">
<input type="hidden" id="addressRuleId" name="addressRuleId" value="1">
<a href="#" id="importbasebtn">Import</a>
<!--<a href="/tariffs/import?bpName=DefaultBP">import</a> -->
<a id="addprefixbtn" href="/tariffs/add-prefix?bpCode=defaultbp&bpName=DefaultBP&addressRuleId=1">Add Prefix</a>
<a href="/tariffs/show-tariffs">Tariff List</a></h1>