Skip to main content
Solved

Can we pass value to input variable of type window using REST API call?


Forum|alt.badge.img+1

I want to set the window title option dynamically using variable as input and passing the value to input variable at runtime.

Is there any way I can achieve this? 

Best answer by Aaron.Gleason

No, there is no way to put a String variable as the title of the window in actions like Recorder: Capture.

What you can do is to use wildcards if your title changes significantly.

Another possibility would be to use JavaScript injection to change the browser window to the value in the variable. This would change the browser title to a known value that you could then use in your Recorder: Capture actions. (e.g., this changes a dynamic browser title to a fixed one)

 

View original
Did this topic help answer your question?

3 replies

Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+10
  • Automation Anywhere Team
  • 569 replies
  • Answer
  • April 15, 2025

No, there is no way to put a String variable as the title of the window in actions like Recorder: Capture.

What you can do is to use wildcards if your title changes significantly.

Another possibility would be to use JavaScript injection to change the browser window to the value in the variable. This would change the browser title to a known value that you could then use in your Recorder: Capture actions. (e.g., this changes a dynamic browser title to a fixed one)

 


Forum|alt.badge.img+1
  • Author
  • Cadet | Tier 2
  • 1 reply
  • April 16, 2025

@Aaron.Gleason the wildcards logic works as expected. Thanks for the help!


zaid.chougle
Forum|alt.badge.img+5
  • Navigator | Tier 3
  • 50 replies
  • April 16, 2025
Aaron.Gleason wrote:

No, there is no way to put a String variable as the title of the window in actions like Recorder: Capture.

What you can do is to use wildcards if your title changes significantly.

Another possibility would be to use JavaScript injection to change the browser window to the value in the variable. This would change the browser title to a known value that you could then use in your Recorder: Capture actions. (e.g., this changes a dynamic browser title to a fixed one)

 

Great thought ​@Aaron.Gleason ,

But I think I did this somewhere where I passed the title dynamically to the variable using Window actions, what you can try is ​@surathak when the browser opens you can use Window→ Get Active Window title → Save it to variable and then use Window→ Set title and use the variables 

Let me know if it works


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings