Micro Focus QTP (UFT) Forums

Full Version: Customizing Descriptive Programming
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
Should work. Did it throw you any error message?
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
Please ensure to include your code between [code] tags while asking or replying to questions. I have done this for you for this time.