I'm having an issue where the team that developed a web based application used a WYSIWYG editor and, a couple months ago, they updated some of the HTML form labels and IDs. My team creates macros that work with the DOM to gather/enter/update information in these web based applications. When I got a report about the update, I looked into it and found that the original code for a specific line was:
strQ = objIE.document.getElementById("ctl00_ContentPlaceHolder1_lblQueue").innerTEXT
Whatever is in the label for this element ID would be stored in strQ
and used to detect the work queue the user is working from in another web based application. When the team for the first application made the update, the code for the label's element ID became:
strQ = objIE.document.getElementById("ContentPlaceHolder1_lblQueue").innerTEXT
As you can see, they removed the ctl00_
from the beginning of the label' element ID. Just a few days ago, then made another update and it was added back. Since all the label IDs begin with ContentPlaceHolder1_
and can sometimes contain ctl00_
, is there any way of using RegExp to simply find lblQueue
in the label's ID?