Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script not Running
#1
Solved: 10 Years, 8 Months, 4 Weeks ago
Hi ,

See the following Script.

Code:
SystemUtil.Run "iexplore","google.com"
Browser("name:=Google").Page("title:=Google").WebEdit("name:=q").Set "admin"
Browser("name:=Google").Page("title:=Google").WebButton("name:=Google Search").Click
Browser("name:=admin - Google Search").Page("title:=admin - Google Search").Link("name:=Images","text:=Images").Click

Here I am getting the error: Link object not identified Uniquely.

Can Anyone tell me how to solve this problem??? I am giving two properties to QTP to uniquely identify the link. then also it is throwing the same error.

Please Help me out...SEE ATTACHMENT FOR ERROR

Thanks...


Attached Files Image(s)
   
Reply
#2
Solved: 10 Years, 8 Months, 4 Weeks ago
Hi Bhawin

I tried the script given by you without any changes done, it works fine for me.
I think when you were trying this script, there must be multiple links with the same properties (which you have specified right now). so try with adding some more property values.
Reply
#3
Solved: 10 Years, 8 Months, 4 Weeks ago
Hi Bhawin,

In case you are finding difficulty in identifying unique property ,please try assigning index.

Regards
Punam
Reply
#4
Solved: 10 Years, 8 Months, 4 Weeks ago
Ok Punam Thanks...Smile but unfortunately i knw descriptive programming by passing string in the form of arguments only...i dont knw the description .create method...
Reply
#5
Solved: 10 Years, 8 Months, 4 Weeks ago
Hi Bhawin,

I think what Punam is trying to convey is configure your Object Identification mechanism(Ordinal Identifier) to use Index and try.

you can also assign index by passing string in the form of arguments only.
Code:
Browser("name:=admin - Google Search").Page("title:=admin - Google Search").Link("name:=Images","text:=Images","Index:=0").Click

Thanks,
Rajeshwar.
Reply
#6
Solved: 10 Years, 8 Months, 4 Weeks ago
Thanks Rajeshwar..It's Working Absolutely fine...Big GrinBig Grin

But Can I knw What actually happens when we use this indexing...briefly..
Reply
#7
Solved: 10 Years, 8 Months, 4 Weeks ago
Hi Bhavin,
If QTP is not able to identify the Object uniquely using Mandatory + Assistive Property OR Smart identification mechanism (if configured), Ordinal identifier comes to our rescue.

In such a scenario QTP uses recorded description + Ordinal identifier to identify the object, if combined recorded description and ordinal identifier are not sufficient to identify the Object QTP stops and throws the Run Time Error Sad.

So there are 3 types of Ordinal Identifier:
1. Index
2. Location and
3. Creation Time (Specific to browser)

Index is a Numeric value based on the order in which the object appears within the source code. Index is 0 based.
If index is selected as an ordinal identifier then the QTP will generate the sequence of the number starting from 0,1,2.... and so on based on the sequence of corresponding Objects in the program.
For Example:
If you use index: =2 to describe a link test object, QTP searches for the 3rd Link object on the page.
If you use index: =2 to describe a WebElement object, QTP searches for the 3rd object on the page irrespective of type.

Please let me know if require more explanation.
Reply
#8
Solved: 10 Years, 8 Months, 4 Weeks ago
Wow.!!! great..Thanks Rajeshwar..I understood..!!!!Cool

I am Weak at Scripting...I want to learn it from beginner to expert level..

Do u have an idea hw can i do that..????
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  "UFT has stopped working" is displayed during running the script kotaramamohana 0 1,205 08-24-2018, 01:07 PM
Last Post: kotaramamohana
  running a script on two machine sametime sria123 3 3,709 05-09-2013, 09:53 AM
Last Post: basanth27
  Script running more times than the values in global data table TPavani 5 4,149 10-04-2012, 11:18 PM
Last Post: krr
  how to handle errors while running test batch script sureshkumar 0 1,904 11-11-2011, 04:38 PM
Last Post: sureshkumar
  Running QTP script from a VB Application scsenthil 0 2,005 07-06-2009, 11:18 AM
Last Post: scsenthil

Forum Jump:


Users browsing this thread: 1 Guest(s)