Skip to main content
language edits
Source Link
user246
user246

I have a requirement to fetch the ID of a <tr> tag based on the country name (TestIndia1). I am trying editingto edit the record, but while editing, it requires the ID.

So please let me know how to fetch the ID from the html using a regular expression.

<tr role="row" id="241" tabindex="-1" class="ui-widget-content jqgrow ui-row-ltr">
    <td role="gridcell" style="text-align:center;width: 30px;" aria-describedby="list2_cb">
    <input role="checkbox" type="checkbox" id="jqg_list2_241" class="regular-checkbox cbox" name="jqg_list2_241"><label for="jqg_list2_241">
    </label></td><td role="gridcell" aria-describedby="list2_subgrid" class="ui-sgcollapsed sgcollapsed " style="">
    <a style="cursor:pointer;"><span class="ui-icon ui-icon-plus"></span></a></td>
    <td role="gridcell" style="text-align:left;" aria-describedby="list2_mc_country"><a class="inline-edit-link " href="http://example.com|id|241">TestIndia1</a></td>

I have a requirement to fetch the ID of a <tr> tag based on the country name (TestIndia1). I am trying editing the record, but while editing, it requires the ID.

So please let me know how to fetch the ID from the html using a regular expression.

<tr role="row" id="241" tabindex="-1" class="ui-widget-content jqgrow ui-row-ltr">
    <td role="gridcell" style="text-align:center;width: 30px;" aria-describedby="list2_cb">
    <input role="checkbox" type="checkbox" id="jqg_list2_241" class="regular-checkbox cbox" name="jqg_list2_241"><label for="jqg_list2_241">
    </label></td><td role="gridcell" aria-describedby="list2_subgrid" class="ui-sgcollapsed sgcollapsed " style="">
    <a style="cursor:pointer;"><span class="ui-icon ui-icon-plus"></span></a></td>
    <td role="gridcell" style="text-align:left;" aria-describedby="list2_mc_country"><a class="inline-edit-link " href="http://example.com|id|241">TestIndia1</a></td>

I have a requirement to fetch the ID of a <tr> tag based on the country name (TestIndia1). I am trying to edit the record, but while editing, it requires the ID.

So please let me know how to fetch the ID from the html using a regular expression.

<tr role="row" id="241" tabindex="-1" class="ui-widget-content jqgrow ui-row-ltr">
    <td role="gridcell" style="text-align:center;width: 30px;" aria-describedby="list2_cb">
    <input role="checkbox" type="checkbox" id="jqg_list2_241" class="regular-checkbox cbox" name="jqg_list2_241"><label for="jqg_list2_241">
    </label></td><td role="gridcell" aria-describedby="list2_subgrid" class="ui-sgcollapsed sgcollapsed " style="">
    <a style="cursor:pointer;"><span class="ui-icon ui-icon-plus"></span></a></td>
    <td role="gridcell" style="text-align:left;" aria-describedby="list2_mc_country"><a class="inline-edit-link " href="http://example.com|id|241">TestIndia1</a></td>

Extracting an HTML ID using Jmeter regular expression extractor

I have a requirement to fetch the ID of a <tr> tag based on the country name (TestIndia1). I try toam trying editing the record, but while editing it, it requires the ID.

So please let me know how to fetch the ID from the html using a regular expression.

<tr role="row" id="241" tabindex="-1" class="ui-widget-content jqgrow ui-row-ltr">
    <td role="gridcell" style="text-align:center;width: 30px;" aria-describedby="list2_cb">
    <input role="checkbox" type="checkbox" id="jqg_list2_241" class="regular-checkbox cbox" name="jqg_list2_241"><label for="jqg_list2_241">
    </label></td><td role="gridcell" aria-describedby="list2_subgrid" class="ui-sgcollapsed sgcollapsed " style="">
    <a style="cursor:pointer;"><span class="ui-icon ui-icon-plus"></span></a></td>
    <td role="gridcell" style="text-align:left;" aria-describedby="list2_mc_country"><a class="inline-edit-link " href="http://example.com|id|241">TestIndia1</a></td>

Jmeter regular expression extractor

I have a requirement to fetch the ID of a <tr> tag based on the country name (TestIndia1). I try to editing the record, but while editing it, it requires the ID.

So please let me know how to fetch the ID from the html using a regular expression.

<tr role="row" id="241" tabindex="-1" class="ui-widget-content jqgrow ui-row-ltr">
    <td role="gridcell" style="text-align:center;width: 30px;" aria-describedby="list2_cb">
    <input role="checkbox" type="checkbox" id="jqg_list2_241" class="regular-checkbox cbox" name="jqg_list2_241"><label for="jqg_list2_241">
    </label></td><td role="gridcell" aria-describedby="list2_subgrid" class="ui-sgcollapsed sgcollapsed " style="">
    <a style="cursor:pointer;"><span class="ui-icon ui-icon-plus"></span></a></td>
    <td role="gridcell" style="text-align:left;" aria-describedby="list2_mc_country"><a class="inline-edit-link " href="http://example.com|id|241">TestIndia1</a></td>

Extracting an HTML ID using Jmeter regular expression extractor

I have a requirement to fetch the ID of a <tr> tag based on the country name (TestIndia1). I am trying editing the record, but while editing, it requires the ID.

So please let me know how to fetch the ID from the html using a regular expression.

<tr role="row" id="241" tabindex="-1" class="ui-widget-content jqgrow ui-row-ltr">
    <td role="gridcell" style="text-align:center;width: 30px;" aria-describedby="list2_cb">
    <input role="checkbox" type="checkbox" id="jqg_list2_241" class="regular-checkbox cbox" name="jqg_list2_241"><label for="jqg_list2_241">
    </label></td><td role="gridcell" aria-describedby="list2_subgrid" class="ui-sgcollapsed sgcollapsed " style="">
    <a style="cursor:pointer;"><span class="ui-icon ui-icon-plus"></span></a></td>
    <td role="gridcell" style="text-align:left;" aria-describedby="list2_mc_country"><a class="inline-edit-link " href="http://example.com|id|241">TestIndia1</a></td>
deleted 21 characters in body
Source Link
QAMember
  • 1.5k
  • 15
  • 37
  • 57

I have a requirement to fetch the ID of a <tr> tag based on the country name (TestIndia1). I try to editing the record, but while editing it, it requires the ID.

So please let me know how to fetch the ID from the html using a regular expression or xpath extractor.

<tr role="row" id="241" tabindex="-1" class="ui-widget-content jqgrow ui-row-ltr">
    <td role="gridcell" style="text-align:center;width: 30px;" aria-describedby="list2_cb">
    <input role="checkbox" type="checkbox" id="jqg_list2_241" class="regular-checkbox cbox" name="jqg_list2_241"><label for="jqg_list2_241">
    </label></td><td role="gridcell" aria-describedby="list2_subgrid" class="ui-sgcollapsed sgcollapsed " style="">
    <a style="cursor:pointer;"><span class="ui-icon ui-icon-plus"></span></a></td>
    <td role="gridcell" style="text-align:left;" aria-describedby="list2_mc_country"><a class="inline-edit-link " href="http://example.com|id|241">TestIndia1</a></td>

I have a requirement to fetch the ID of a <tr> tag based on the country name (TestIndia1). I try to editing the record, but while editing it, it requires the ID.

So please let me know how to fetch the ID from the html using a regular expression or xpath extractor.

<tr role="row" id="241" tabindex="-1" class="ui-widget-content jqgrow ui-row-ltr">
    <td role="gridcell" style="text-align:center;width: 30px;" aria-describedby="list2_cb">
    <input role="checkbox" type="checkbox" id="jqg_list2_241" class="regular-checkbox cbox" name="jqg_list2_241"><label for="jqg_list2_241">
    </label></td><td role="gridcell" aria-describedby="list2_subgrid" class="ui-sgcollapsed sgcollapsed " style="">
    <a style="cursor:pointer;"><span class="ui-icon ui-icon-plus"></span></a></td>
    <td role="gridcell" style="text-align:left;" aria-describedby="list2_mc_country"><a class="inline-edit-link " href="http://example.com|id|241">TestIndia1</a></td>

I have a requirement to fetch the ID of a <tr> tag based on the country name (TestIndia1). I try to editing the record, but while editing it, it requires the ID.

So please let me know how to fetch the ID from the html using a regular expression.

<tr role="row" id="241" tabindex="-1" class="ui-widget-content jqgrow ui-row-ltr">
    <td role="gridcell" style="text-align:center;width: 30px;" aria-describedby="list2_cb">
    <input role="checkbox" type="checkbox" id="jqg_list2_241" class="regular-checkbox cbox" name="jqg_list2_241"><label for="jqg_list2_241">
    </label></td><td role="gridcell" aria-describedby="list2_subgrid" class="ui-sgcollapsed sgcollapsed " style="">
    <a style="cursor:pointer;"><span class="ui-icon ui-icon-plus"></span></a></td>
    <td role="gridcell" style="text-align:left;" aria-describedby="list2_mc_country"><a class="inline-edit-link " href="http://example.com|id|241">TestIndia1</a></td>
Source Link
QAMember
  • 1.5k
  • 15
  • 37
  • 57
Loading