Micro Focus QTP (UFT) Forums

Full Version: Problem in identifying the object
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I am trying to identify the gmail objects with the following code in dp:

Code:
y = Browser("title:=Gmail").GetROProperty("name")
msgbox y
Above code is executing correctly and displaying the output.
But the below code on the same page is throwing the error,attached the screenshot of the error.
x = Browser("name:=Inbox (2,397) - paras.sidhu@gmail.com - Gmail#inbox").GetROProperty("name")
msgbox x

Please help.

Thanks,
Paras
Hi Paras,
it fails because "(", ")" , "." has got special meaning..hence it is handled through escape sequence "\" to consider their literal meaning.however this fails when the number changes.To handle that use regular expression.
Code:
x = Browser("name:=Inbox \(2,397\) - paras\.sidhu@gmail\.com - Gmail#inbox").GetROProperty("name")
msgbox x
or
Code:
msgbox Browser("CreationTime:=0").GetROProperty("name")
Thanks Ravi... Its working fine.

Another small issue, while I am executing any of the script, when i click on the 'OK' button on the Run Dialog box, it is displaying some error message, attached the screenshot.

However, on clicking on the 'OK' button, code is getting executed properly. But not sure why that error is coming. Also, in include folder , there is no inc directory present.
Never encountered this error before.Not sure what's in that folder.