Micro Focus QTP (UFT) Forums

Full Version: XPath for web link throws error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to use the following simple xpath, but iam getting maintenance run error

Code:
browser("micclass:=browser").Page("micclass:=page").link("xpath:=//a[@id='addlang']/a[1]").click
HI srselva,

Please find the below code. Just you need a little bit tweak in your xpath definition.

Code:
Browser("micclass:=browser").Page("micclass:=page").link("xpath:=//font[@id='addlang']/a[1]").click
or you can click on the link using below xpath too
Code:
Browser("micclass:=browser").Page("micclass:=page").link("xpath:=//a[contains(text(),'your link text value')]").click

Let me know if you need any more information.