Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
identification difference between descriptive prog and repository
#1
Solved: 10 Years, 9 Months, 1 Week ago
hello,

I try to use a descriptive element in order to parameterize a part of objet description (innerhtml for now)

When I use this descriptive line QTP gave me an error (Cannot identify the object "[ WebElement ]" (of class WebElement). Verify that this object's properties match an object currently displayed in your application.)

Code:
Browser("").Page("").WebElement("html tag:=SPAN, class:=dijitTreeLabel, innertext:=test").
Click ==> KO

If I add this element to repository manually and add the same things for identification, it works

lets say add testObj in repository as WebElement using :
innertext => test
html tag => SPAN
class => dijitTreeLabel

Code:
Browser("").Page("").WebElement("testObj")
.Click => it works


Where do I make an error ?
Reply
#2
Solved: 10 Years, 9 Months, 1 Week ago
Hello gerfred,

Try
Code:
Browser("").Page("").WebElement("html tag:=SPAN", "class:=dijitTreeLabel","innertext:=test").Click   instead of Browser("").Page("").WebElement("html tag:=SPAN, class:=dijitTreeLabel, innertext:=test").Click

You have to specify every property within different sets of double quotes.

Hope this will work now.
Reply
#3
Solved: 10 Years, 9 Months, 1 Week ago
many thanks it works for now

regards,
Reply
#4
Solved: 10 Years, 9 Months, 1 Week ago MyBB 
Code:
systemutil.Run "iexplore", "www.google.com"

'* Using Descriptive Programming
msgbox Browser("Creationtime:=0").GetROProperty("name")

Dim des
Set des=description.Create()
des("micclass").value="Link"

Set val = Browser("Creationtime:=0").page("index:=0").ChildObjects(des)

For i=0 to val.count-1
    res = val(i).getroproperty("name")
    print res
    If (res = "Sign in") Then
        Browser("Creationtime:=0").page("index:=0").Link("name:="&res).Click
        Exit For
    End If
Next



'* Using Object Repository
Browser("Google").Page("Google").Link("Sign in").Click
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Difference in Window Identification Nagaraju6 0 1,984 12-06-2013, 07:08 PM
Last Post: Nagaraju6
  diiferecnce between object repository and object identification Ishul 3 3,032 04-26-2012, 07:44 AM
Last Post: Ram2009
  difference b/w Activex & delphi environment hello 0 2,460 01-10-2012, 03:38 PM
Last Post: hello
Exclamation What is the Difference between Standard, Maintenance and Update Run mode kai07 2 17,943 10-13-2011, 08:52 AM
Last Post: kai07
  difference between loadfunctionlibrary and executefile payal 1 15,331 09-22-2011, 08:33 PM
Last Post: Saket

Forum Jump:


Users browsing this thread: 2 Guest(s)