VBA Express Forum  




Go Back   VBA Express Forum > VBA Code & Other Help > Other Applications Help
     Feedback     
Register FAQ Members Arcade Knowledge Base Training Articles Consulting

Reply
 
Thread Tools Display Modes
Old 08-12-2011, 08:27 AM   #1
mv8167

 
Joined: Aug 2011
Posts: 1
Kb Entries: 0
Articles: 0
Descriptive Programming


Can I use variables with Descriptive Programming that are "Strings" or Numeric?

My code (which returns null for the Set TableObj


VBA:
For Gr = 1 To 13 'Loop thru GroupNames in Action1 file If DataTable.GetSheet("Action1").GetParameter("Execute").ValueByRow(Gr) = 1 Then GroupName = DataTable.GetSheet("Action1").GetParameter("GroupName").ValueByRow(Gr) Browser("Wisdom").Page("WisdomLogin").Frame("parent").Link(GroupName).Click NumGr = Gr*2+3 'Find table to extract data from Set TableObj = Browser("Wisdom").Page("WisdomLogin").Frame("parent").WebTable("Document Type.*", "name:=GroupName", "Index:=NumGr") Next
VBA tags courtesy of www.thecodenet.com

thx for any ideas?


Thx for your help.

Lorena

Last edited by xld : 08-13-2011 at 03:14 AM. Reason: Added VBA tags

Local Time: 12:26 AM
Local Date: 05-20-2013
Location:

 
Reply With Quote Top
Old 08-13-2011, 03:57 AM   #2
xld
 
xld's Avatar
Distinguished Lord of VBAX

 
Joined: Apr 2005
Posts: 23,118
Kb Entries: 3
Articles: 2
You need to explain what you mean by that first sentence.


____________________________________________
Nihil simul inventum est et perfectum

Abusus non tollit usum

Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber

Local Time: 06:26 AM
Local Date: 05-20-2013
Location:

 
Reply With Quote Top
Old 12-12-2011, 10:28 PM   #3
frdq19

 
Joined: Dec 2011
Posts: 3
Kb Entries: 0
Articles: 0
Descriptive programming is used when we want to perform an operation on an object that is not present in the object repository. There can be various valid reason to do so. We will discuss them later in this article.

How to write Descriptive Programming?

There are two ways in which descriptive programming can be used

1. By giving the description in form of the string arguments.
2. By creating properties collection object for the description.

When using programmatic descriptions from a specific point within a test object hierarchy, you must continue to use programmatic descriptions
from that point onward within the same statement. If you specify a test object by its object repository name after other objects in the hierarchy have
been described using programmatic descriptions, QuickTest cannot identify the object.

For example, you can use Browser(Desc1).Page(Desc1).Link(desc3), since it uses programmatic descriptions throughout the entire test object hierarchy.
You can also use Browser("Index").Page(Desc1).Link(desc3), since it uses programmatic descriptions from a certain point in the description (starting
from the Page object description).

However, you cannot use Browser(Desc1).Page(Desc1).Link("Example1"), since it uses programmatic descriptions for the Browser and Page objects but
then attempts to use an object repository name for the Link test object (QuickTest tries to locate the Link object based on its name, but cannot
locate it in the repository because the parent objects were specified using programmatic descriptions).

Local Time: 09:26 PM
Local Date: 05-19-2013
Location:

 
Reply With Quote Top
Old 12-20-2011, 04:01 PM   #4
Paul_Hossler

 
Joined: Apr 2007
Posts: 2,083
Kb Entries: 0
Articles: 0
Is this VBA? It's just that I've never seen the synax or the objects before (limited experience) and didn't recoginize it

VBA:
For Gr = 1 To 13 'Loop thru GroupNames in Action1 file If DataTable.GetSheet("Action1").GetParameter("Execute").ValueByRow(Gr) = 1 Then GroupName = DataTable.GetSheet("Action1").GetParameter("GroupName").ValueByRow(Gr) Browser("Wisdom").Page("WisdomLogin").Frame("parent").Link(GroupName).Click NumGr = Gr*2+3 'Find table to extract data from Set TableObj = Browser("Wisdom").Page("WisdomLogin").Frame("parent").WebTable("Document Type.*", "name:=GroupName", "Index:=NumGr") Next
VBA tags courtesy of www.thecodenet.com

Paul

Local Time: 01:26 AM
Local Date: 05-20-2013
Location:

 
Reply With Quote Top
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -7. The time now is 10:26 PM.


Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright © 2004 - 2012 VBA Express