Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to pass property name in description?
#1
Not Solved Exclamation 
I am trying to save image displayed via search in google
I have a problem please tell me how to parameterise the below marked
Iam trying to use myImage as a description object value

Code:
set Images =browser("title:=.* ").page("title:=.*").ChildObjects(odesc)
n= Images.count
For i=0 to 1    
    myImage=Images(i).getroproperty("file name")
    If i=0 Then
    with browser("title:=.* ").page("title:=.*")
    .link("name:=See full size image", "innertext:=See full size image", "innerhtml:=See full size image").Click
    .Image("file name:=[color=#FF0000][b]myImage[/b][/color]").CaptureBitmap "c:\a.bmp"


Advance Thanks
Kartik Raman
Reply
#2
Not Solved
Hi Kartik,

FYI, myImage is a 'Variable' not a 'Value' and hence you need to use Concatenation Operators such as '&' while passing a variable.

Go with the below way:

Code:
browser("title:=.* ").page("title:=.*").Image("file name:="&myImage).CaptureBitmap "c:\a.bmp"
Reply
#3
Not Solved
HI,
Thanks for a quick response..
I tried ur solution However it is still not able to recognise to object Please find the error as below:
   

Please help me at the earliest
Thanks in advance
Kartik Raman
Reply
#4
Not Solved
I have tried with this as well
.Image("file name:="&currentimage).CaptureBitmap "c:\a.bmp"
Reply
#5
Not Solved
You may need to add additional property other than file name to identify the image. The best way to do it,
1. add the image to the repository.
2. highlight it in the application.
3. Remove all the property except file name.
4. try highlighting again.
5. Now start adding one by one other property begining from index which may uniquely identify that image.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pass reference to datatable into function smallsteve 2 1,890 09-28-2017, 09:18 PM
Last Post: smallsteve
  How to find out the object property in the Description language . njnirmal 9 6,264 05-19-2015, 12:30 AM
Last Post: qtptester66523
  Can you please help me in QTP DP to pass the variable name anshika.agarwal 1 2,593 09-04-2014, 06:43 PM
Last Post: anshika.agarwal
  Description.Create with same propertie and different values, not working ttralor 2 2,340 01-13-2013, 12:11 AM
Last Post: ttralor
  Pass "/" in Query string to DB Anjali09 0 2,467 01-04-2012, 08:34 PM
Last Post: Anjali09

Forum Jump:


Users browsing this thread: 1 Guest(s)