Unified Functional Testing (formerly QTP) News and Support Forum
Showing results for 
Search instead for 
Do you mean 

Getting error in chrome browser using xpath in dp


Getting error in chrome browser using xpath in dp

[ Edited ]



msgbox Browser("login.xhtml").Page("base.xhtml").WebElement("xpath:=.//*[@id='mainForm:j_idt149_data']/tr[2]/td[3]/div/label").GetROProperty("innertext")


When I run above statement in IE or in firefox ,it runs fine and message box show the value but when i run the same in chrome browser it throws error shown below.


Cannot identify the object "[ WebElement ]" (of class WebElement). Verify that this object's properties match an object currently displayed in your application.

Line (153): "msgbox Browser("login.xhtml").Page("base.xhtml").WebElement("xpath:=.//*[@id='mainForm:j_idt149_data']/tr[2]/td[3]/div/label").GetROProperty("innertext")".




Could any body help me to resolve above problem in chrome browser.



To regenerate the issue again ,plz follow below steps:

Step 1: Launch QTP

Step 2: Open 'www.gmail.com' url in either IE or in firefox browser.

Step 3: Now run this below line in QTP:

msgbox Browser("name:=Gmail: Email from Google").Page("title:=.*").WebElement("xpath:=.//*[@id='quota']").GetROProperty("innertext")


Step 4: You will get value in msgbox.

Step 5: Now if you follow above same steps for chrome browser (instead of IE/firefox)  ,then it throws error.  WHY?




Thanks & Regards

Pradeep Singh

Occasional Collector

Re: Getting error in chrome browser using xpath in dp

[ Edited ]

I have the same problem.

With the HPSW support, I update QTP to UFT 11.5, then xpath based object can be identified in Chrome v24.
If QTP needed only, I think you should submit a defect ticket.


HPE Expert

Re: Getting error in chrome browser using xpath in dp



What is the Chrome version you are using and which QTP web patches you have applied?




“HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.”