Micro Focus QTP (UFT) Forums
question on link - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: question on link (/Thread-question-on-link)



question on link - QAVA - 11-12-2012

Hi,

Code:
Browser("New Tab").Page("Customers_5").Link("test3").Click

when i run qtp, it creates a org then then click the org.
that means, i create a org name test3. it clicks test3. it works.

next time i run the query, it creates a new org test4 but it does not click test4. does not work.

Everytime i run qtp, link name will change. it works if link name is test3. it does not work if the link name is not "test3". how can i click new link if the link name is not test3? object reposity has only test3 under link.

Please help....



Thanks.


RE: question on link - imzeeshan - 11-13-2012

Here is a probable solution:
1. Rename your link object as "Test".
2. Goto your "Test" object's properties and add "innertext" property.
3. Edit that innertext property. Turn ON/Check ON the "regular expression" checkbox.
4. Change innertext value as: " test.* "
(without the quotes ofcourse)
5. Save OR and check.
Let me know if it worked.
Regards,
Zeeshan


RE: question on link - sshukla12 - 11-14-2012

HI,

U can use Descriptive Programing for this also.
Let me know in case u need any help.

Regards,
Sankalp