'Assign accessibility identifiers to urls in UITextView

How can we assign the unique accessibility identifiers to the urls in UITextView? In the accessibility inspector, I am able to see the urls as separate elements but not able to set the accessibility identifiers for them which are needed for automation testing.

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source