Disclaimer: I searched the forum for similar topics, but all the result are pertaining to quite specific situations, instead of the most basic usage.
In short, the issue with “storeText Not being able to store new-line break for multi-line text” has bothered me for at least 5-6 years, which was close to the time when I started using Katalon Recorder (KR). I ended up using Python Selenium solution for multi-line text automation. Until recently, I find that there has still been some situations where KR works quite handy than python. Thus I look back the mulit-line text issue with assistance from AI (Gemini, DeekSeek)
In general, both AI suggested
- storeText COULD handle multi-line text. (But neither Firefox (KR 5.5.2.5) or Chrome (KR 7.1) work for me)
- storeText with $var first, next, use storeEval with $var.replace(regex, “\n”). But this doesn’t work too. perhaps the regex I use might be wrong?
However, storeEval with “ document.querySelector(“Locator…”).innerText ” works perfect
Here, I would like to double confirm, if
- is “storeText” able to handle multi-line text or at least maintain the multi-line text structure? if so, then how ?
- is there other more elegant way of storing multi-line text, instead of storeEval with javascript: document.getElementBy(blah blah) ?
BTW, I am more of FireFox user, and until recently, I realized that KR in FF Add-on is still at 5.5.3 (2021 Aug), whereas KR in Chrome Extension is upgradeable to 7.1 (2024 Dec).
Any plan to update KR in FF in near future?