How to select object like link with random changing structure?

Like in title, i need test activation mail, in this mail i have to click on object with random generate link. My question is, how can i do this, how to add this object to repo and use it?

you can add object dynamically using below code

public class CreateNewTestObject {

 \* Create new test object by Xpath  
 \* @param xpath  
 \* @return test object  
public static TestObject byXpath(String xpath) {  
    TestObject to = new TestObject()  
    return to  


1 Like

Can you show me this for the example ?

Above it an exmaple it self. Let me know if you still haven’t implemented this. I can write in detailed

Open the email in a browser-based/web email client. Right click on the email link and choose Inspect. Right click on the element in the HTML and choose Copy XPATH.

Then define a Test Object in the Object Repository with xpath=‘the xpath goes here’. And use it in your test'Your Test Object'))

Or use the XPATH to call @Rudra’s byXpath keyword.'CreateNewTestObject.byXpath'('xpath goes here'))