Thread Rating:
  • 2 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help about CreateObject
#11
Not Solved
Code:
systemutil.Run "iexplore.exe","http://www.mail.yahoo.com"
browser("title:=Yahoo.*").page("title:=Yahoo.*").webtable("name:=login.*").webedit("name:=login","html tag:=INPUT").set "xyz"
browser("title:=Yahoo.*").page("title:=Yahoo.*").webtable("name:=login.*").webedit("name:=passwd","html tag:=INPUT").set "abc"
browser("title:=Yahoo.*").page("title:=Yahoo.*").webbutton("name:=Sign In").click
hi im swetha ....this above script itzz opening yahoo page but not typing username and password...whtzz d problm in dizz code?
Reply
#12
Not Solved
The format of 'CreateObject' function is:

CreateObject(servername.typename)

please tell me from where can I retrieve the 'servername' of applications.

e.g. generally we use-

1) 'Excel.Application' for MS Excel (why haven't we used MSExcel.Application?)
2) 'InternetExplorer.Application' for Internet Explorer (why didn't we use IExplorer.Application?)
Reply
#13
Not Solved
Those are ProgIDs . Check the list of commonly used ProgIds here http://www.winscripter.com/WSH/COM/61.aspx
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#14
Not Solved
Hi.. Sreesswatha i have joined today only i saw ur query and done some R&d and found that webedit object doesn't have webtable object as its parent, so remove the webtable parent object from your code then run the script. it will work fine i tried it

Bye
S_shiva
Reply
#15
Not Solved

Thanks for nice infomation it is helpful
Reply
#16
Not Solved
Code:
dim objexplorer, pagina, pagina2
set objexplorer     = CreateObject("InternetExplorer.Application")
objexplorer.visible = true
objexplorer.navigate "http://www.google.it"
Set pagina = description.Create()
pagina("micclass").value= "Page"
Set pagina2= objexplorer.childobjects(pagina)


now try by executing above script
Reply
#17
Not Solved
A Description Object in QTP is a collection of test object property and value pairs. Each object in the app classifies to be part of a collection. It is a very powerful approach to create object collections – each object in the collection will resemble each other by the property-value pairs specified by a description object.


Code:
Set oDesc = Description.Create


Description.Create is used to create a 0-based Properties collection object. The variable oDesc is preceded by the Set statement. Usage of Set statement binds an object as a reference to another object. Therefore, oDesc becomes an object reference to the description object represented by Description.Create. A description object does not have a stand-alone use, but coupled with the ChildObjects method, it becomes an extremely powerful approach in dealing with AUT’s objects.
Reply
#18
Not Solved
Hi Shusheel,

Please use regular expression in the recorded property values of the objects in OR. i.e. TeScreen("screen28888") , TeField("field167") 
Suppose if the value for Name property is screen28888 then make it as screen\d+ so it will match all screens with name as "sceen....."
Apply this change to every recorded object description.

Thanks,
Arun
Reply
#19
Not Solved
Hi Sir/Mam,

Can any one tell me how to post a new query in this forum. As I am fresher in my company joined as an Automation. I know only basics, to get clarification and good information from seniors and experts of this forum.

Thanks
Anusha
Reply
#20
Not Solved
Dear Anusha,

You may go to this link and find out the relevent article as per your need https://www.learnqtp.com/forums/index.php
If you need to ask anything related to a particular post, you can post your query in the same post and members would reply on your query.

Happy learning!! :-)
Arun
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Detail info about createObject() nandu 1 4,099 11-30-2010, 10:36 AM
Last Post: Saket
  Need list of "objects" used in qtp by using "CreateObject" SaranKumarV 2 15,525 09-15-2010, 05:03 PM
Last Post: SaranKumarV
  What is the exact meaning of CreateObject() Rajashekar Gouda 1 5,333 01-17-2008, 02:37 PM
Last Post: Ankur

Forum Jump:


Users browsing this thread: 1 Guest(s)