Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
descriptive programming
#1
Not Solved


Hi, can any one tell me why the following programme shows general run error. I do not have any programming back ground or scripting knowledge. I am fond of programming..so learning descriptive programming on my own

help me pl....


Code:
'Retrieve Child Object Properties

Class Childobject_Properties

Function child_object_on_browser(objn,objp,excelname)
Set xl=createobject("excel.application")
xl.workbooks.open(excelname)
xl.worksheets(2).name=objn
xl.activeworkbook.save
'xl.visible.true

Set objc=description.Create
objc("micclass:").value=objn                    

Set objc1=browser("name:=User Login page").Page("name:=User Login page").ChildObjects(objc)
no.c=objc1.count

For i=0 to no.c-1
    co.p=objc1(i).getROProperty(objp)
    k=i+1

    Do
    x=xl.sheets(objn).cells(k,1)

    If x=empty  Then
        Exit do
        else k=k+1
    End If
  Loop
  xl.sheets(objn).cells(k,1)= objp                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
Next

xl.activeworkbook.save
xl.quit
Set xl=nothing
Set objc=nothing
Set objc1=nothing

End Function
                                                
End class                  

objn1="web edit"
objp1="name"
excelname1="E:\Automation Framework\Test Data\Child Object Properties.xls"

Set obj_Childobject_Properties=new Childobject_Properties
var=obj_Childobject_Properties.child_object_on_browser(objn1,objp1,excelname1)

Set objc=nothing
Set objc1=nothing
Reply
#2
Not Solved
Dear Rekha,
I Would Recommend you to read the following article.

https://www.learnqtp.com/descriptive-pro...implified/

Do you what exactly this code is doing ?
Reply
#3
Not Solved
The script is to retrieve the child objects' (web edit) properties(name) of a web page (KSMC:ACCPAY:Account Groupin) to an excel sheet.

It says general run error and stopped at 15 line shown below

Code:
Set objc1=browser("name:=KSMC:ACCPAY:Account Group").Page("name:=KSMC:ACCPAY:Account Group").ChildObjects(objc)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Dynamic descriptive Programming issue in Terminal Emulator cprasad 1 1,948 04-25-2019, 08:17 PM
Last Post: Ankur
  UFT Tool support with Descriptive programming laks 1 1,774 07-05-2018, 05:31 PM
Last Post: Ankur
  UFT Descriptive Programming objects not identified in a secure & private intranet env bugfinder2 1 1,827 06-07-2017, 01:41 PM
Last Post: Ankur
  UFT descriptive programming Browser("creationtime:=-1") not always working SOUMYADEEP 0 3,087 01-20-2017, 01:53 AM
Last Post: SOUMYADEEP
  Inserting variable values into Descriptive Programming Functions eske99 2 3,508 12-18-2015, 01:47 PM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)