What is the best way to locate the input element by HTML ID?

The page URL is dynamic, but the text box has a static HTML ID value (standard input control). How to locate the element and send a text string to it?

1 Like

Hi @igor3

Indicate the element of the text box. Check the Strict selectors and uncheck the Fuzzy and Image.
Open the Properties of the activity and open the Strict selectors in Ui Explorer in that there are many attributes select that attribute which has HTML code. In that attribute create a variable.

In that variable pass the html code that you want to sent.

Hope it helps!!

1 Like

Hi @igor3, try out below steps

  1. Use the Find Element activity:
  • Drag and drop a “Find Element” activity onto your workflow.
  • Indicate the element on the web page by selecting the “Indicate element inside browser” option.
  • Use the “Selector” editor to create a selector that targets the HTML input element with the static HTML ID value.
  • Test the selector to ensure it correctly identifies the target element.
  1. Use the Type Into activity:
  • After finding the element, drag and drop a “Type Into” activity onto your workflow.
  • In the “Element” field of the “Type Into” activity, select the output variable from the “Find Element” activity. This will ensure that the text is typed into the located input element.
  • In the “Text” field, enter the text string that you want to send to the input element.

@mkankatala idea also a good one!

Hi @igor3 ,
You can use set text or InjectJS script
Regards,
LNV