Micro Focus QTP (UFT) Forums
Customizing Descriptive Programming - 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: UFT / QTP Regular Expressions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Regular-Expressions)
+--- Thread: Customizing Descriptive Programming (/Thread-Customizing-Descriptive-Programming)



Customizing Descriptive Programming - chitu576 - 04-17-2013

Hi,

I have the below line of codes in DP

Code:
Set  Dbrowser=description.Create
Dbrowser("micclass").value="Browser"
Dbrowser("title").value="Google"

Set  Dpage=description.Create
Dpage("micclass").value="Page"
Dpage("title").value="Google"

Set DWebbutton = Desciption.create
DWebbutton("micclass").value="Webbutton"
DWebbutton("innertext")="Sign In"

Browser(Dbrowser).Page(Dpage).Webbutton(Dwebbutton).click

Can i replace "
Code:
Browser(Dbrowser).Page(Dpage).Webbutton(Dwebbutton)
" with a variable as mypage and use it as mypage.click?

If we cant use the above, can anyone let us know how to modify it ?

Thanks.


RE: Customizing Descriptive Programming - basanth27 - 04-17-2013

Should work. Did it throw you any error message?


RE: Customizing Descriptive Programming - Benak - 04-17-2013

Hi,

The above mentioned lines of code should work, but u need to create an object for that as mentioned below.

Code:
Set mypage = Browser(Dbrowser).Page(Dpage).Webbutton(Dwebbutton)
mypage.Click

Pls revert back still if u face any issue.

Thanks,
Benak


RE: Customizing Descriptive Programming - Staff - 07-05-2013

Please ensure to include your code between [code] tags while asking or replying to questions. I have done this for you for this time.