Pages

Sunday, April 3

Descriptive Programming in QTP - Part 4



Hello Friends!


In Part-1, Part-2, Part-3 of this post we learned basics, type, use and various methods of descriptive programming.


In this part we will continue with more good stuff.. :)


Apart from GetROPropety, these are some other methods which are very useful in DP.


- GetTOProperty
- GetTOProperties

- SetTOProperty



GetTOProperty returns the value of the specified property from the test object description.


Example:
Msgbox Browser("MyBrowser").Page("MyPage").GetTOProperty("html tag")




GetTOProperties returns the collection of properties and values used to identify the object.


Example:
Set Propset = Browser("MyBrowser").Page("MyPage").GetTOProperties
Above statement will give you all the properties used in object identification by QTP to an array Propset. All these properties and values can be retrieved using below code..


For i = 0 to Propset.Count-1
    Print Propset(i).Name & ":=" & Propset(i).Value
Next

SetTOProperty is used to set the value of the specified property in the test object description. It is used when you require to change the any particular property at run time.


For Example you need to work open/work on two instances of an application at same time. Obviously, all the properties will be same. In this situation you can use SetTOProperty to change properties at run-time.


Please note that changes made by SetTOProperty will be applicable at runtime only. Once your execution is finished, no change will be saved. Also changes will be applicable to that action only.



Example:
Browser("MyBrowser").Page("MyPage").WebElement("my text").SetTOProperty "Style", "'color:blue'"


Feel free to post comments if you have any question from this or last three posts.

155 comments:

  1. hi can u explain the get, set properties with more syntax

    ReplyDelete
  2. All the posts are Very Good and really helpful.
    Thanks for sharing such a good knowledge on site.

    Thanks.

    ReplyDelete
  3. Classic and simple examples Mr.Jain. Thanks for sharing such great knowledge.

    Thanks
    Anvitha

    ReplyDelete
  4. hi
    i couldn't get the difference between gettoproperty and getroproperty

    please elaborate a little more.

    ReplyDelete
  5. Thnx... very simple and helpfull

    ReplyDelete
  6. Hi Abhikansh,
    First of all thanks for this informations which are really help full.
    I have question that how a tester use these properties (GetTOProperty,GetTOProperties,SetTOProperty) in real testing environment.
    I want to understand the concept of using these properties.

    I hope you will explain this very well.
    Thanks
    Nikunj

    ReplyDelete
  7. Awesome ...U r doing a great job..Its really helpful

    ReplyDelete
  8. This blog is very helpful please add more codes with examples for verious topis.

    ReplyDelete
  9. blog is useful? if testing a website how to write script using Descriptive Programming ? can u give me an sample?

    ReplyDelete
  10. Hello Mr Abhikansh,

    Thanks for very useful posts.
    It could be great if you can post some sample projects which completes the whole sense of all your posts.

    ReplyDelete
  11. @Sushma - Thanks for your words. Its not feasible to post whole projects on blog as a project/framework has lots of components!!

    More then happy to help on any queries you have..

    ReplyDelete
  12. @ Nikunj

    GetTOProperty - most commonly used, gives a one particular property
    GetTOProperties - gives all the properties of object in an array
    SetTOProperty - used to set a property at runtime

    I'll try to write a post on it asap. Thanks.

    ReplyDelete
  13. Your information about qtp is really interesting. Also I want to know the latest new techniques which are implemented in qtp. Can you update it in your website?
    Qtp training Chennai

    ReplyDelete
  14. Hi..Interesting posts.. I need to assign a variable to getroproperty..for example I want to write like this..B= Browser("Yahoo Finance - Business").Page("Yahoo Finance - Business_2"). Frame("mainFrame_5").WebElement("O").GetROProperty("innertext") ` Current Price....is it possible to write like this?

    ReplyDelete
  15. Technology place a vital part in humans ecosystem. So in order to survive one must be up to date. Thanks for sharing this information in here. Keep blogging article like this. I have bookmarked this page for future reference.

    Hadoop Training Chennai

    ReplyDelete
  16. Nice..You have clearly explained about the conept..Its very useful for me to undertand..Keep on sharing..
    Hadoop training in chennai

    ReplyDelete
  17. Excellant content. To know the details and importance of python course visit below. Python is an object oriented high level programming language which is built in data structures combined with dynamic typing and dynamic binding making it very attractive for rapid application development.
    Python Training in Chennai | Python Course in Chennai

    ReplyDelete
  18. Thanks for Sharing the valuable information and thanks for sharing the wonderful article..We are glad to see such a wonderful article..
    QTP Training in Chennai | QTP Training Institute in Chennai | QTP Training

    ReplyDelete
  19. Excellent sharing. Testing is a wonderful field for IT peoples. Want to learn Selenium Training reach GangBoard. Hadoop Online Training

    ReplyDelete
  20. I would like to say thank you for the amazing details and concepts you are sharing in this.
    Webseiten Gestaltung Lüdenscheid

    ReplyDelete
  21. I found a lot of interesting information here. A really good post
    office 2010 professional plus key deutsch

    ReplyDelete

  22. Thanks For Your valuable posting, it was very informative
    Internet Marketing Dienstleistungen

    ReplyDelete
  23. There are so many useful information in your post, I like it all the time. And I want to share this boost app ranking with you, you can take a look. This is very useful.

    ReplyDelete
  24. Very interesting content which helps me to get the in depth knowledge about the technology. Thanks for sharing and keep updating.
    MSC Project Center in Chennai | MSC Project Center in Velachery

    ReplyDelete
  25. I think it's awesome. I hope all goes well with this articles. More new information gained.
    ME/M.Tech Project Center in Chennai | ME/M.Tech Project Center in Velachery

    ReplyDelete
  26. Very happy to see this blog. Gives a wonderful information with coded explanaion. Thank you for this blog. very useful to me.
    Java Training in Chennai | Web Designing Training Institute in Chennai | DotNet Training Institute in Chennai

    ReplyDelete
  27. Amazing writeup. Very much useful for beginners. Thanks for sharing...
    IEEE Project Center in Chennai | IEEE Project Center in Velachery

    ReplyDelete
  28. Awesome blog with informative content.Thanks for sharing such a nice blog..Java Project Center in Chennai | Java Project Center in Velachery

    ReplyDelete
  29. Amazing Article, thank you!. I am very glad to read your informative & practical blog. Kindly keep updating your blog.

    white label website builder

    ReplyDelete
  30. Pretty article! I found some useful information in your blog, it was awesome to read.DotNet Project Center in Chennai | DotNet Project Center in Velachery

    ReplyDelete
  31. I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
    aws training in Chennai

    ReplyDelete
  32. Your website content nice nice and interesting to observe.
    jobbörse Neunkirchen

    ReplyDelete
  33. I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
    aws training in Chennai

    ReplyDelete
  34. I really enjoy simply reading all of your weblogs. Simply wanted to inform you that you have people like me who appreciate your work.
    Python Certification Exam Center in Chennai | Best Python Courses in Tambaram

    ReplyDelete
  35. Nice Post! It is really interesting to read from the beginning & I would like to share your blog to my circles, keep your blog as updated.


    aws training in chennai

    selenium training in chennai

    python training in chennai

    ReplyDelete
  36. Those guidelines additionally worked to become a good way to
    recognize that other people online have the identical fervor like mine
    to grasp great deal more around this condition.

    hadoop training in chennai

    angularjs training in chennai

    devops training in chennai

    digital marketing training in chennai

    ReplyDelete
  37. Nice post... Really you are done a wonderful job. Thanks for sharing such wonderful information with us. Please keep on updating...

    Best Java Training Academy in Kanchipuram

    ReplyDelete
  38. Wonderful post. Thank you for updating such an informative content.


    Best Python Training Academy in Kanchipuram

    ReplyDelete
  39. Thanks for this greatful information. all this information is very important to all the users and can be used good at all this process
    Best Tally ERP 9.0 Training Academy in Kanchipuram

    ReplyDelete
  40. really you have posted an informative blog. it will be really helpful to many peoples. thank you for sharing this blog. so keep on sharing such kind of useful blogs.

    Best TALLY ERP 9.0 Training Academy In Kanchipuram

    ReplyDelete
  41. Your article was so impressive and informative. Its very interesting to read. Thanks for sharing,
    Best web design Training Institute in Kanchipuram

    ReplyDelete
  42. thank you for such a great article with us. hope it will be much useful for us. please keep on updating..
    Best software testing Training Institute in Kanchipuram

    ReplyDelete
  43. The best thing is that your blog really informative thanks for your great information
    Best tally erp 9 Course Training Institute in kanchipuram|

    ReplyDelete
  44. This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    Best UIPath Robotic Process Automation Course Training Institute in kanchipuram|

    ReplyDelete
  45. We are providing online support to the customers. If you want support from the expert's to your problem, you can click on the link.
    Norton.com/setup
    Norton.com/setup
    Norton.com/setup

    ReplyDelete
  46. Very nice post here and thanks for it .I always like and such a super blog of these post.Excellent and very cool idea and great blog of different kinds of the valuable information's.
    Best Tally Erp 9.0 Course Training Institute in kanchipuram|

    ReplyDelete
  47. Interesting post!!! Thanks for posting such a useful information. I wish to read your upcoming post to enhance my skill set and keep blogging.
    Best Tally Erp 9.0 Course Training Institute in kanchipuram|

    ReplyDelete
  48. Thanks for your informative blog.Your post helped me to understand the future and career prospects. Keep on updating your blog with such awesome blog.
    No:1 IT Project Center in Kanchipuram



    ReplyDelete
  49. Really it was an awesome blog...very interesting to read..You have provided an nice information....Thanks for sharing..
    Best Hardware & Networking Course Training Institute in kanchipuram|

    ReplyDelete
  50. Thanks for sharing in this blog...its very useful for us...keep on going...
    Best MS Office Course Training Institute in kanchipuram|

    ReplyDelete
  51. Nice blog. Thank you for sharing. The information you shared is very effective for

    learners I have got some important suggestions from it.
    No:1 CCNA Training Academy in

    Kanchipuram


    ReplyDelete
  52. I think this is the best article today. Thanks for taking your own time to discuss this

    topic, I feel happy about that curiosity has increased to learn more about this

    topic.Keep sharing your information regularly for my future reference. No:1 CCNP Training Academy in

    Kanchipuram



    ReplyDelete
  53. I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly.
    Best Cloud Computing Course Training Institute in kanchipuram|

    ReplyDelete
  54. Nice..You have clearly explained about the conept..Its very useful for me to
    undertand..Keep on sharing..

    No:1Tally Training Academy in Kanchipuram







    ReplyDelete
  55. Marvelous and fascinating information.Thanks for this greatful blog. keep your blog updated.
    Best Hardware & Networking Course Training Institute in kanchipuram|

    ReplyDelete
  56. Nice..You have clearly explained about the conept..Its very useful for me to
    undertand..Keep on sharing..

    No:1 Embedded system Training Academy in Kanchipuram







    ReplyDelete
  57. I’m sincerely suggesting your blog.nice and really helpful information to everyone... thanks for sharing
    Best Python Course Training Institute in kanchipuram|

    ReplyDelete
  58. really you have posted an informative blog. it will be really helpful to many peoples. thank you for sharing this blog. so keep on sharing such kind of useful blogs.
    No:1 Best NS2 (Network Simulator) Project Center in kanchipuram|

    ReplyDelete
  59. very usefull informatation.and iam expecting more posts like this please keep updating us....
    No:1 Best Android Project Center in kanchipuram|

    ReplyDelete
  60. You post explain everything in detail and it was very interesting to read.Thank you for Sharing.
    No:1 Best Dotnet Project Center in kanchipuram|

    ReplyDelete
  61. After I see your blog it was so impressive and informative content. thanks for sharing such a lovely blog.
    No:1 Best MBA (Master of Business Administration) Project Center in kanchipuram|

    ReplyDelete
  62. It is really a great and useful piece of information. I am glad that you shared this helpful info with us. Please keep us up to date like this. Thank you for sharing.
    No:1
    VLSI Training Center in kanchipuram

    ReplyDelete
  63. This was a worthy blog. I enjoyed reading this blog and got an idea about it. Keep sharing more like this.
    No:1 Best Selenium Automation Training Center in kanchipuram|

    ReplyDelete
  64. this is really too useful and have more ideas from yours. keep sharing many
    techniques.

    No:1TCA training Center in Kanchipuram









    ReplyDelete
  65. After reading your blog, I was quite interested to learn more about this information. Thanks for sharing.
    No:1 Best PGDCA Training Center in kanchipuram|

    ReplyDelete
  66. Wow it is really wonderful and awesome thus it is very much useful for me to understand many information and helped me a lot. it is really explainable very well and i got more information from your blog.
    No:1 Best Tally Training Center in kanchipuram|

    ReplyDelete

  67. Nice post... Really you are done a wonderful job. Thanks for sharing such wonderful information with us. Please keep on updating...No:1 CCNA Exam Center In Chennai|

    ReplyDelete
  68. this is really too useful and have more ideas from yours. keep sharing many
    techniques.

    No:1 CCNA training Center in Kanchipuram









    ReplyDelete
  69. This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information, this is useful to me…
    No:1 Best Tally Training Center in kanchipuram|

    ReplyDelete

  70. Thanks for sharing these niche piece of coding to our knowledge. Here, I had a solution for my inconclusive problems & it’s really helps me a lot keep updates…No:1 CCNP Exam Center in Chennai|

    ReplyDelete
  71. The best thing is that your blog really informative thanks for your great information!No:1 ISTQB Exam Center in Chennai|

    ReplyDelete
  72. I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly. No: 1 ITIL Exam Center in Chennai|

    ReplyDelete
  73. I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly.No: 1 PMP Exam Center in Chennai|

    ReplyDelete
  74. It is really a great and useful piece of information. I am glad that you shared this helpful info with us. Please keep us up to date like this. Thank you for sharing.
    IT Project Center in Chennai

    ReplyDelete

  75. Good one, it is very useful for me to learn and understand, thanks for sharing your information and ideas.. keep rocks..No: 1 AWS Exam Center in Chennai|

    ReplyDelete
  76. It is really a great and useful piece of information. I am glad that you shared this helpful info with us. Please keep us up to date like this. Thank you for sharing.
    IT Project Center in Chennai

    ReplyDelete
  77. I am really happy with your blog because your blog is very unique and powerful for new reader.No: 1 Microsoft Exam Center in Chennai|

    ReplyDelete

  78. I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly. 
No: 1 AZURE Exam Center in Chennai|

    ReplyDelete
  79. It is really a great and useful piece of information. I am glad that you shared this helpful info

    with us. Please keep us up to date like this. Thank you for sharing.
    ISTQB

    Exam Center in Chennai

    ReplyDelete
  80. This information is impressive..I am inspired with your

    post writing style & how continuously you describe this

    topic. After reading your post, thanks for taking the time

    to discuss this, I feel happy about it and I love learning

    more about this topic
    AWS Certification in

    Chennai

    ReplyDelete
  81. Thanks for posting this useful content, Good to know about new things here, Keep updating your blog...No: 1 Blue Prium Certification in Chennai|

    ReplyDelete
  82. Hi, am a big follower of your blog. The best thing is that your blog really informative thanks for your great information!No: 1 NS 2 Project Center in Chennai|

    ReplyDelete
  83. Its really an Excellent post. I just stumbled upon your blog and wanted to say that I

    have really enjoyed reading your blog. Thanks for sharing.
    No:1PHP Project Center in chennai










    ReplyDelete
  84. Nice blog. Thank you for sharing. The information you shared is very effective for learners I have got some important suggestions from it.No: 1 JAVA Application Center in Chennai|

    ReplyDelete
  85. These provided information was really so nice,thanks for giving that post and the more skills to develop after refer that post. Your bolg really impressed for me,because of all information so nice.No: 1 NS 2 Project Center in Chennai|

    ReplyDelete
  86. Great and useful article.Thanks for taking time to share this post
    Android Project Center in Chennai

    ReplyDelete
  87. I found a lot of interesting information here. A really good post. keep updating.No: 1 MBA Project Center in Chennai|

    ReplyDelete
  88. I have read your blog. Good and more

    informationuseful for me, Thanks for sharing this

    information keep it up....

    No.1 Python Project Center in Chennai







    ReplyDelete
  89. Quite Interesting post!!! Thanks for posting such a useful post. I wish to read your upcoming post to enhance my skill set, keep blogging.No: 1 BBA Project Center in Chennai|

    ReplyDelete
  90. Excellent post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it.
    Embedded Training Center in Kanchipuram

    ReplyDelete
  91. Excellent post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it.
    Embedded Training Center in Kanchipuram

    ReplyDelete
  92. Nice Post! It is really interesting to read from the beginning & I would like to share your blog to my circles, keep your blog as updated.
    No.1 CCNA Training Center In Kanchipuram

    ReplyDelete
  93. I found a lot of interesting information here. A really good post. keep updating.
    MBA Project Center in Kanchipuram

    ReplyDelete
  94. Great post. Wonderful information and really very much useful. Thanks for sharing and keep updating.No: 1 MBA Project Center in Chennai|

    ReplyDelete
  95. Very nice blog. It is very useful for me. I read your blog completely. I gather lot of information in this post. Thanks for sharing. No: 1 BBA Project Center in Chennai |

    ReplyDelete
  96. Wonderful post with great piece of information. I'm learning a lot from your blog. Keep sharing. No: 1 CCNA Training Center in Kanchipuram|

    ReplyDelete
  97. Thanks for giving great kind of information. Thanks for your excellent blog, nice work keep it up thanks for sharing the knowledge. No: 1 Graphic Designing Course in Kanchipuram|

    ReplyDelete
  98. This was a worthy blog. I enjoyed reading this blog and got an idea about it. Keep sharing more like this.
    JAVA Training Center in Kanchipuram

    ReplyDelete
  99. Nice Post! It is really interesting to read from the beginning & I would like to share your blog to my circles, keep your blog as updated.
    No.1 Android Training Institute In Kanchipuram








    ReplyDelete
  100. Thanks for making me this Blog. You have done a great job by sharing this content here. Keep writing blog like this
    MBA Project Center in Kanchipuram

    ReplyDelete
  101. Very nice post here and thanks for it .I always like and such a super blog of these post.Excellent and very cool idea and great blog of different kinds of the valuable information's. No: 1 IOS Training Center in Kanchipuram|

    ReplyDelete
  102. You post explain everything in detail and it was very interesting to read.Thank you for Sharing.
    IEEE Project Center in Kanchipuram

    ReplyDelete
  103. What a fantastic blog you should written in well manner.Iam really happy to read this
    blog.Thanks for sharing.keep sharing more blogs.
    No.1 Tally Training Institute In Kanchipuram

    ReplyDelete
  104. Quite Interesting post!!! Thanks for posting such a useful post. I wish to read your upcoming post to enhance my skill set, keep blogging
    ISTQB Project Center in Kanchipuram

    ReplyDelete
  105. Well Said, you have furnished the right information that will be useful to anyone at all time... No: 1 Tally Erp 9.0 Training Center in Kanchipuram|

    ReplyDelete
  106. Quite Interesting post!!! Thanks for posting such a useful post. I wish to read your upcoming post to enhance my skill set, keep blogging
    ISTQB Certification Academy in Kanchipuram

    ReplyDelete
  107. Congratulations guys, quality information you have given!!!..Its really useful blog. Thanks for sharing this useful information.
    No.1 Selenium Training Center In Kanchipuram

    ReplyDelete
  108. Good blog. I gained more information about your post. keep updating. No: 1 MS OFFICE Training Center in Chennai|

    ReplyDelete
  109. This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information, this is useful to me…
    Machine Learning Training Center In Chennai

    ReplyDelete
  110. I found a lot of interesting information here. A really

    good post. keep updating.
    Python Training Center in

    Chennai

    ReplyDelete
  111. I really love reading and following your post as I find them extremely informative and interesting. This post is equally informative as well as interesting. No: 1 Data Science Training Center in Chennai|

    ReplyDelete
  112. Your article is really an wonderful with useful content, thank you so much for sharing such an informative information. keep updating.
    IOS Training Academy in Kanchipuram

    ReplyDelete
  113. What a fantastic blog you should written in well manner.Iam really happy to read this
    blog.Thanks for sharing.keep sharing more blogs.
    No.1 python Training center in Kanchipuram

    ReplyDelete
  114. Thanks for your informative blog. Your post helped me to understand the future and

    career prospects. Keep on updating your blog with such awesome blog.
    Software Testing Training institute in

    Kanchipuram

    ReplyDelete
  115. Awesome Post!!! With unique content, I really get interest to read this post. I hope this article help many of them who looking this pretty information.
    No.1 Android Training institute in Kanchipuram

    ReplyDelete
  116. Thanks for your informative blog. Your post helped me to understand the future and career prospects. Keep on updating your blog with such awesome blog.
    Software Testing Training institute in Kanchipuram

    ReplyDelete
  117. Really it was an awesome blog...very interesting to read..You have provided an nice information....Thanks for sharing..
    Python Project Center in Kanchipuram

    ReplyDelete
  118. Really it was an awesome blog...very interesting to read..You have provided an nice information....Thanks for sharing..
    MBA Project Center in Chennai

    ReplyDelete
  119. Very happy to see this blog. Gives a wonderful information with coded explanation. Thank you for this blog. very useful to me. No: 1 JAVA Training Institute in Kanchipuram|

    ReplyDelete
  120. Very nice post here and thanks for it .I always like and such a super blog of these post.Excellent and very cool idea and great blog of different kinds of the valuable information's. No: 1 .Net Training Institute in Kanchipuram|

    ReplyDelete
  121. Thanks for sharing this unique and informative post. This blog which provided me the required information. No: 1 .Net Training Institute in Kanchipuram|

    ReplyDelete
  122. I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly.
    Final year Mini project in Chennai

    ReplyDelete
  123. Thanks for your informative blog.Your post helped me to understand the future and career prospects. Keep on updating your blog with such awesome blog.
    Final years student project In Chennai

    ReplyDelete
  124. Learning different language at various part of our life will give us a great confidencec towards life. This article explicitly states the same. You have done a great job by sharing it here in your blog. Keep doing this.
    No.1 MBA project Center in Chennai

    ReplyDelete
  125. Excellent blog. Very interesting to read. I really love to read such a nice a information. Thanks! keep rocking. No: 1 Final Year Project in Chennai|

    ReplyDelete