Skip to main content

How to insert text into HTML tag

?


Forum|alt.badge.img+12

I run into this textarea which is not a real textarea but a <p> tag, of which the InnerText is editable. I want the BOT to automatically input some text in it but there is no SetText action for this object captured by the recorder.

 

Tried GetProperty of InnerText and assign it to a String vairable and then put some text into this String variable but not reflected in the HTML page.

 

Anybody can help on this? Thanks,

 

8 replies

Ashwin A.K
Forum|alt.badge.img+8
  • Navigator | Tier 3
  • 2445 replies
  • May 6, 2022

Hi @alex zhang​ ,

 

Would you be so kind as to include few screenshots of the element you are trying to interact with?

 

Kind Regards,

Ashwin A.K


  • Cadet | Tier 2
  • 4 replies
  • May 7, 2022

imageimageIs this helpful? Please let me know if you need more information. Thanks,


Ashwin A.K
Forum|alt.badge.img+8
  • Navigator | Tier 3
  • 2445 replies
  • May 7, 2022

Hi @alex zhang​ ,

 

Could you check if this XPath returns a single match in the Inspection Window?

 

//html[@class='CSS1Compat']/p[1]

If so, then you can set it into the DOMXPath and set the Capture Operation to Click, followed by Simulate Keystrokes to enter the desired text.

 

You could also try capturing the Search textbar to generate the Set Text option and simply change the DOMXpath and see if that works, then that way you won't have to rely on the Simulate Keystrokes.

 

Kind Regards,

Ashwin A.K


  • Cadet | Tier 2
  • 4 replies
  • May 9, 2022

Thanks and it seems working but now I encounter a bigger problem. Every time I run the capture, the web page got messed up like below. Not sure if this is because the "Text Area" is emebbed in an iframe. Can you pls help? Thanks,

image


Ashwin A.K
Forum|alt.badge.img+8
  • Navigator | Tier 3
  • 2445 replies
  • May 9, 2022

Hi @alex zhang​ ,

 

I'm sorry but could you please explain what the issue is?

 

Kind Regards,

Ashwin A.K


Ashwin A.K
Forum|alt.badge.img+8
  • Navigator | Tier 3
  • 2445 replies
  • May 9, 2022

Hi @alex zhang​ ,

 

Could you try using the Capture Action to simply click into the Textbox region and then use a Simulate Keystrokes to type in the text?

 

Kind Regards,

Ashwin A.K


  • Cadet | Tier 2
  • 4 replies
  • May 9, 2022

I only did capture and click like below and it will mess up the page too. I don't understand how come AA can modify the target's layout. I thought AA is only impersonating a persion to interactive with the target. The only suspicous thing to me is that the text box region is part of the content embedded into an iframe. Thanks,

image


  • Cadet | Tier 2
  • 4 replies
  • May 9, 2022

The web page layout is totally messed up. The toolbar at the top is missing. The search bar is going down and the red alert triangle goes up. Anyway the elements are not at their original positions now. Please compare the two screenshots below. The upper one is after running capture and lower one is before. Thanks,imageimage


Reply


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