Getting error in chrome browser using xpath in dp (579 Views)
Posts: 35
Registered: ‎12-10-2012
Message 1 of 3 (579 Views)

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 '' 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
Posts: 2
Registered: ‎11-17-2013
Message 2 of 3 (458 Views)

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.


HP Expert
Posts: 245
Registered: ‎08-06-2013
Message 3 of 3 (449 Views)

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.”
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.