Thanks for your help Piotr.
Did I follow your directions correctly? Please see…
[info] Executing: | storeText | //div[@id='search-results']/ul/li/fl-user-tile/div[3]/button | textFromPage |
[info] Store 'Hire Me' into 'textFromPage'
[info] Executing: | runScript | return ‘${textFromPage}’.split(’ ')[1] | secondWord |
[info] Expand variable 'return ‘${textFromPage}’.split(’ ')[1]' into 'return ‘Hire Me’.split(’ ')[1]'
[info] Executing: | echo | | secondWord |
[info] Time: Fri Jul 10 2020 05:48:16 GMT-0700 (Pacific Daylight Time) Timestamp: 1594385296796
[info] Test case passed
How can I cause secondWord to eventually end up in a spreadsheet?
Frankly, I have just about solved my problem—albeit inelegantly—by kludging togetherer Katalon Recorder and a couple of Python scripts (each of which calls a couple of bash scripts) which I execute with a hotkey via AutoKey. But, as I’m sure you know, remarkably kludgy solutions like this tend to break. And frankly, I barely know how to use Python.
Therefore, I’m not sure if I would be able to fix my solution if it were to break. Of course, I would rather have a more elegant solution instead of this Rube Goldberg contraption I have reluctantly fashioned out of necessity.
I suppose ideally, I’d like Katalon recorder append the value of secondWord to a text file which I could later manually import into a spreadsheet such as Google Sheets or Gnumeric.
In case you want a chuckle, here’s one of my two Python scripts…
import time
time.sleep(0.2)
times_to_repeat = 10
while times_to_repeat > 0:
keyboard.send_keys("<tab>")
time.sleep(0.2)
keyboard.send_keys("<enter>")
time.sleep(0.2)
keyboard.send_keys("<tab>")
time.sleep(0.2)
keyboard.send_key('<right>', repeat=3)
time.sleep(0.2)
keyboard.send_keys("<shift>+<ctrl>+<right>")
time.sleep(0.2)
keyboard.send_keys("<shift>+<left>")
time.sleep(0.2)
keyboard.send_keys("<ctrl>+c")
time.sleep(0.2)
keyboard.send_keys("<escape>")
time.sleep(0.2)
window.activate('Google Chrome',switchDesktop=True)
time.sleep(0.2)
keyboard.send_keys("<ctrl>+v")
time.sleep(1.0)
keyboard.send_keys("<down>")
time.sleep(0.2)
window.activate('Firefox',switchDesktop=True)
time.sleep(0.4)
times_to_repeat -= 1