Good morning all, I was recently given a number of scripts to maintain in UFT. (but no training on how the tool actually works) For the most part I can struggle along by recording web application screen actions and then modifying as necessary; however we have some applications created in Outystems where the id and name of web screen inputs is dynamically generated, so the scripts are constantly breaking.
An example of a user Input is below. The OutsystemsUIWeb_wt16, 17, 28 in the name and id change on a regular basis, so the element in the local repository is no longer valid. I have tried updated the repository entry in UFT to use a regular expression but it doesn't seem to be working. Since the name/id always end in wtUserInput I updated properties to use Regular Expression and entered wtUserNameInput$. But its not being found when the script runs. Any ideas?
<input name="OutSystemsUIWeb_wt16$block$wtLogin$OutSystemsUIWeb_wt17$block$wtLogin$OutSystemsUIWeb_wt28$block$wtInput$wtUserNameInput" type="text" id="OutSystemsUIWeb_wt16_block_wtLogin_OutSystemsUIWeb_wt17_block_wtLogin_OutSystemsUIWeb_wt28_block_wtInput_wtUserNameInput" tabindex="5" class="input OSFillParent" onkeydown="return OsEnterKey('OutSystemsUIWeb_wt16_block_wtLogin_OutSystemsUIWeb_wt17_block_wtLogin_wt15', arguments || window.event);" aria-invalid="false" style="font-size: 18px; font-weight: bold; height: 50px; padding: 30px 0px 4px 0px;">
Thank you so much! Everything I was reading said to use $ if you wanted to use a regex that evaluated a string ending with a certain value. when is it appropriate to use the $?
I've never used $ I've always used .*
Sorry I don't know when $ is appropriate.
It is possible that you are missing escaped characters in your regex expression. Because $ symbol is a special character in regex expression. The correct value should be:
Please try and see if it helps for you issue.