runScript window. references broken after selectFrame

I can replicate on FireFox(62) or Chrome(70).

I have a script that navigates through a menu to a search page. I enter my search values, click search and move into my destination page. As the Recorder captures that activity, as I key the first search criteria field, a selectWindow index=0 is also captured. I’ve found with that in place runScript no longer accesses variables correctly.

Is there a way I can work around this? The script hangs until timeout on the next object reference if I don’t keep the selectFrame in place.

Regular Katalon variables continue working, but I need to be able to do some manipulation with the field data on the page I’m navigating into.

Thanks

Here’s a sample:

Open | (application) |
click | (Open Menu) |
click | (Select item) |

runScript | window.text = 1 |
runScript | return window.text | text
echo | ${text} |

selectFrame | index = 0 |

runScript | window.text = 2 |
runScript | return window.text | text
echo | ${text} |

runScript | window.text3 = 3 |
runScript | return window.text3 | text3
echo | ${text3} |

log:

[info] Executing: | runScript | window.text=1 | |
[info] Executing: | runScript | return window.text | text |
[info] Store ‘1’ into ‘text’
[info] Executing: | echo | ${text} | |
[info] Expand variable ‘${text}’ into ‘1’
[info] echo: 1
[info] Executing: | selectFrame | index=0 | |
[info] Expand variable ‘index=0’ into ‘index=0’
[info] Executing: | runScript | window.text=2 | |
[info] Executing: | runScript | return window.text | text |
[info] Executing: | echo | ${text} | |
[info] Expand variable ‘${text}’ into ‘1’
[info] echo: 1
[info] Executing: | runScript | window.text=3 | |
[info] Executing: | runScript | return window.text3 | text3 |
[info] Executing: | echo | ${text3} | |
[info] Expand variable ‘${text3}’ into ‘${text3}’
[info] echo: ${text3}