Micro Focus QTP (UFT) Forums
Descriptive Programming for Web Page - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Descriptive Programming for Web Page (/Thread-Descriptive-Programming-for-Web-Page)



Descriptive Programming for Web Page - shriqtp - 06-10-2009

Hi,

I would like to write DP for Web page...

Ex:

Code:
Set desc=description.Create
desc("    ").Value = "Yahoo"
desc("Class Name").value= "Browser"

Can anyone help me in that. Please send the example Code.

Thanks
Shrinivas


RE: Descriptive Programming for Web Page - guocnc - 06-12-2009

Code:
desc("micclass")="Browser"
desc("Title")="Yahoo"



RE: Descriptive Programming for Web Page - shriqtp - 06-12-2009

Thanks guocnc for the reply.

I tried that and it is working ok.

I have Posted a new query for FRAME, please check the same.

Like following script is working ok
Code:
Browser(var1).Page(var2).WebButton(var3).click

But now for some Webpages i have a Frame - WebElement in between. like
Code:
Browser(var1).Page(var2).Frame(var3).WebButton(var4).click
For Frame:
Code:
var3("micclass").value = "WebElement"
var3("name").value = "nav"

--> not working for me

Can you please suggest me how would be the DP for FRAME

Thanks
Shrinivas


RE: Descriptive Programming for Web Page - Ankur - 06-15-2009

Logic of writing DP remains the same for all objects. If you understand the concept behind Object identification, writing any DP statements shouldn't be a problem. Please refer this post to get an understanding of how qtp recognize objects Also this post on Descriptive programming in QTP

Here is a step by step procedure for you -

  1. Record the object
  2. Go to OR and find out which property QTP has used to identify the object.
  3. Use the same properties in the DP statements.



RE: Descriptive Programming for Web Page - shriqtp - 06-16-2009

Hi Ankur,
gr8....it worked fine

After analyzing your given links, added some more properties into test from Object Identification --> Web and then it worked absolutely fine.

Thanks a lot for you help.

Have a nice day
Shrinivas