Kindly follow the below html code. I want to get the text “DefaultBP” in between the tag. If i using this “//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="http://sqa.stackexchange.com/tariffs/import?bpName=DefaultBP">import</a>  -->                   
                     <a id="addprefixbtn" href="http://sqa.stackexchange.com/tariffs/add-prefix?bpCode=defaultbp&bpName=DefaultBP&addressRuleId=1">Add Prefix</a>
                    <a href="http://sqa.stackexchange.com/tariffs/show-tariffs">Tariff List</a></h1>



Source link https://sqa.stackexchange.com/questions/35399/regarding-taking-xpath

LEAVE A REPLY

Please enter your comment!
Please enter your name here