Add ID to inline text link (custom message)

The id attribute specifies a unique id for an HTML element which can point to a style in a stylesheet, be targeted by JavaScript, and/or referenced in your QA workflows. In this article, we will cover how to add the id attribute to inline text links within an existing custom message to allow automated QA testing of that link being selected. 

Click Messages on the left-hand panel and select Custom Messages from the subsequent menu.

Screenshot 2025-03-11 at 1.49.19 PM.png

Use the property field in the upper right-hand corner to select a property for which you will edit a custom message.

Screen_Shot_2021-10-25_at_2.12.41_PM.png

Navigate to your custom message and click the Edit icon inline with the message name. 

Screenshot 2025-03-11 at 1.52.30 PM.png

From the custom message builder, select a text component from the preview pane for which you wish to add an id attribute to an inline link.

Navigate to the Settings pane and expand the Content accordion.

Screenshot 2025-03-11 at 1.57.37 PM.png

In the provided text space, highlight the inline text link and click the # icon in the toolbar.

Screenshot 2025-03-11 at 1.59.01 PM.png

Add the value for the id attribute in the provided space and click Add ID

Screenshot 2025-03-11 at 2.03.23 PM.png

Click Save Message when finished. 

The id attribute will be assigned to the inline text link. Confirm the id attribute by surfacing your custom message on your property and use the browser console to inspect the inline text link.

Screenshot 2025-03-11 at 2.34.50 PM.png

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.