Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
script for clicking an image in QTP
#1
Not Solved Shy 
Hi all

I am trying to clicking an image called "End of Record". After writing a script for this function, if i run this script. It shows an error msg as " [COLOR="red"]The End of record object was not found in the Object Repository.
Check the Object Repository to confirm that the object exists or to find the correct name for the object.[/COLOR]"
My code is,
Code:
strBrowser="title:=ECShipLite"
Browser(strBrowser).Page(strBrowser).Image("name:=End of Record").Click
Plz can any one help me to solve tis problem. Thanks in advance.

Cheers,
preetha Wink
Reply
#2
Not Solved
Hi Preetha,

YOu can debug the issue by checking the object property in RunTime. Place a brakepoint @ the step where you want to click on the End of record, then spy the object and cross check the object properties with the OR properties.

Let me know if you need any help.
Thanks,
SUpputuri
Reply
#3
Not Solved
Hi

I tried using the debug. Still it showing the same message. But in OR the object is exist. Now what shall i do to solve this problem?
I used this code to check whether it finds the object or not,
Code:
strBrowser="title:=xxx"
If Browser(strBrowser).Page(strBrowser).Image("name:=End of Record").Exist(1) Then
    Print "Image found"
    Browser(strBrowser).Page(strBrowser).Image("name:=End of Record").Click
    Else If not Browser(strBrowser).Page(strBrowser).Image("name:=End of Record").Exist(1) Then
    Print "Image not found"
    End If
    End If

It prints that "Image not found".
Cheers,
Preetha.
Reply
#4
Not Solved
It's name only exist in the OR not on the page. You can not use the name property in DP, unless there is a name tag on the object, because it ignores the OR. Try using html id or some other description. That should work.
Reply
#5
Not Solved Wink 
Hi Preetha,

Try set of properties of Image to identify it.Sometimes one property is not sufficient to identify the object.

Use some other properties like html id, innertext etc.....

Hope it will work .....

Smile
Reply
#6
Not Solved
Hi
For that objet there is no Html id and innertext property. So i used webtable and Image type properties . It showing the same error. It cant able to identify the object. can u plz say me how to solve this problem.
Thanks in advance.

Regards,
Preetha.
Reply
#7
Not Solved
You can use any property on the img tag. Try alt or source (if its unique). if it's not unique, you can still use it but you will need an index property as well.
Reply
#8
Not Solved
Hi Preetha, Is this issue solved?
Reply
#9
Not Solved
I have similar issues many times. Often I have found that while the Object exists in the Repository and I am selecting the correct values for the DP that it still is not working.

I have found that this is most often because I am missing a level, sometimes the record is not capturing deep enough. More specifically, some of my images and fields are not only in the browser and on the page, but also in a frame, inside of a table. In this case -- I am needing to go back and add the frame information and the table information that is listed in the object spy.

Perhaps you are having a similar issue. (This is my main reason for getting this error and similar errors.)

I hope this helps.
Reply
#10
Not Solved
Try this

Code:
Browser("micclass:=Browser").Page("micclass:=Page").Image("file name:=[b]name of the image file.extension[/b]").click
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Winbutton slow in clicking kpat 0 1,848 05-23-2016, 12:09 PM
Last Post: kpat
  Clicking on sublink venkatesh9032 1 2,805 06-01-2015, 08:26 PM
Last Post: babu123
Exclamation Login & logout in Siebel and clicking pop-up button yuetling926 7 11,455 07-09-2014, 10:43 PM
Last Post: hhamilton
  Clicking a link in an outlook email using QTP kirti 0 5,654 06-15-2014, 01:25 AM
Last Post: kirti
  QTP not clicking on Yes button in the IE pop up dialog adityasrinivasb 2 9,695 09-29-2013, 11:01 PM
Last Post: prashantrawat101@gmail.com

Forum Jump:


Users browsing this thread: 1 Guest(s)