Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Identifying Objects on any screem
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi,
I need to create a QTP script which identifies all the objects say buttons, drop down etc. on any screen and validates them.
It should be a reusable script.

Can anyone help on this.

Thanks, Dipti
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi dipti,
try like this For Button:

Code:
Class ButtonClass

Funcion Webbutton("Logicalname",ObjectName,WaitTime)
Set objButton=Browser("Google").Page("Google")
If objButton.Exist(WaitTime) Then
ObjectName.Click
End If
Set objButton=Nothing
End Function

End Class

ButtonClass.Webbutton "Submit",Browser("Google").Page("Google").Webbutton("Submit"),10




Regards,
Arul
Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
For one of my project I had a similar scenario to work.
We had created a function which will take - type of object(swfbutton),name of object (Name) and the object path(.SWfwindow("Main"))

And then inside function we can put a switch statement and perfom whatever operation we have to perform.

This is one time effort but this function we can reuse multiple times and it was really useful.

Please revert back if you have any query regarding this.
Reply
#4
Solved: 11 Years, 3 Months, 3 Weeks ago
Thanks Shridevi.

It would be great help, if you could mail or post the function code.
Atleast i would get some idea.
In my project i need to capture all the elements on any opened screen and then validate them.

mailid: dipti.pasricha@gmail.com

Regards,
Dipti
Reply
#5
Solved: 11 Years, 3 Months, 3 Weeks ago
HI Dipti,

we can capture the elements using the childobjects but I need some more clarification on the validation part. What do you mean by validate? What type of validation?
Thanks,
SUpputuri
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  QTP is not identifying Parent objects it self then how can we automate swapna.9n9 0 2,025 12-11-2014, 04:32 PM
Last Post: swapna.9n9
  UFT11.5 is not identifying the objects in IE9. qtpexpert 1 2,825 03-19-2013, 11:59 AM
Last Post: gaveyom
  QTP is not identifying the objects in .net application. qtpexpert 0 2,670 03-12-2013, 12:59 PM
Last Post: qtpexpert
  QTP- identifying same objects with same properties sumalatha 8 28,110 08-07-2012, 04:25 PM
Last Post: abhishekjain_87
  QTP not identifying the objects in the application rao 12 11,436 03-06-2010, 11:07 PM
Last Post: virensawant

Forum Jump:


Users browsing this thread: 1 Guest(s)