Hello there,


I'm building a macro to manage some tickets and I now want the application to get some data from a website.

1st I need it to sort out which tab to use, the only value that's unique is the ticket number, in this case "INC0347911"


I've seen a few places in the HTML code where the ticket number is located


Here's a chunk of the site

HTML Code:
<script type="text/ng-template" id="angular.do?sysparm_type=get_partial&amp;name=sn_reference_popover_button.xml">
  <button ng-click="togglePopover($event)" tabindex="{{::buttonTabIndex}}" data-for="sys_display.{{ref}}" name="lookup.{{ref}}" id="lookup.{{ref}}" title="Lookup using list" type="button" class="btn btn-default sn-popover-complex icon icon-search"><span class="sr-only">Lookup using list</span></button></script><div class="section_header_div_no_scroll form_title" data-form-title="INC0347911" id="incident.form_header"><input type="hidden" value="incident.do" id="section_form_id"></input><span tab_caption="Incident" id="section_tab.bf1d96e3c0a801640190725e63f8ac80" class="tabs2_section tabs2_section_0 tabs2_section0" tab_caption_raw="" data-header-only="true" data-section-id="bf1d96e3c0a801640190725e63f8ac80"><span class="section " id="section-bf1d96e3c0a801640190725e63f8ac80" data-header-only="true"><nav class="navbar navbar-default section_zero " data-id="bf1d96e3c0a801640190725e63f8ac80" data-type="section_head"><div class="container-fluid"><div class="navbar-header"><input type="HIDDEN" id="sysverb_back"></input><button title="Back" class="btn btn-default icon-chevron-left navbar-btn" onClick="return gsftSubmit(this.previousSibling)"><span class="sr-only">Back</span></button><button title="Additional actions" class="btn btn-icon icon-menu navbar-btn" onclick="contextShow(event, '1', 200, grabOffsetTop(this) + 20, grabOffsetLeft(this) + 24);event.cancelBubble=true;Event.stop(event);"><span class="sr-only">Additional actions</span></button><h2 draggable="true" ondragstart="event.dataTransfer.setData('text', Object.toJSON({ icon: 'form', url: window.location.href, title: g_form.getTitle(), table: g_form.getTableName() }))" class="form_header navbar-title navbar-title-twoline"><input type="HIDDEN" name="sysverb_view_change" id="sysverb_view_change"></input><div title="Current View: Default view (click me for other views)" class="pointerhand" onclick="contextShow(event, 'labelMenu', -1, 0, 0);event.cancelBubble=true;"><div class="navbar-title-caption">Incident</div><div class="navbar-title-display-value">INC0347911</div></div></h2></div><div class="navbar-right"><span style="display: ;" id="section_head_right.bf1d96e3c0a801640190725e63f8ac80"><script>NOW.streamLinkTarget = '';
Here are the two places I've found where that ticket number appears:

HTML Code:
class="section_header_div_no_scroll form_title" data-form-title="INC0347911" id="incident.form_header"
HTML Code:
class="navbar-title-caption">Incident</div><div class="navbar-title-display-value">INC0347911
So I guess my question is how to look into all the available tabs and look for that particular class, to make sure I'm modifying the right tab.
Could someone point me in the right direction? I've been brwosing the web and came up with many chunks of code but they usually need the name of the tab or the URL, but there's no way to pick it up through URL because the ticket numebr is not in it, so I can't make it choose one ticket from the other 20 that are open.
Help please?

Thank you