Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Descriptive programming for Data Driven in QTP
#1
Solved: 11 Years, 4 Months, 3 Weeks ago
HI,

I faced the below question in GenPact Interview. Please give me the descriptive programming for the scenarioe.

If two text boxes are there in a "form". ....>A table contains some records which contains usernames & password....what is the script we need to write using descriptive programming concept....in QTP(simply data driven test script of qtp)?

Thanks in advance
Keerthana
Reply
#2
Solved: 11 Years, 4 Months, 3 Weeks ago At 
You can use VBScript to automate this scenario.
1st Approach:

Add both the text boxes as an objects in Object Repository.After that use 'Global' sheet to create a table.

Code

Code:
Browser("Mercury").Page("Mercury").WebEdit("UserName").Set("UserName",dtGlobalSheet)
Browser("Mercury").Page("Mercury").WebEdit("Password").Set("Password",dtGlobalSheet)

2nd Approach:


Use 'Description.Create' for creating the object.

Code:
Set objText= Description.Create()
objText("Class Name").value = "WebEdit"
objText("name").value = "UserName"
Browser("Mercury").Page("Mercury").WebEdit(objText).Set("UserName",dtGlobalSheet)

Hope this will help you!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Dynamic descriptive Programming issue in Terminal Emulator cprasad 1 1,997 04-25-2019, 08:17 PM
Last Post: Ankur
  UFT Tool support with Descriptive programming laks 1 1,843 07-05-2018, 05:31 PM
Last Post: Ankur
  UFT Descriptive Programming objects not identified in a secure & private intranet env bugfinder2 1 1,890 06-07-2017, 01:41 PM
Last Post: Ankur
  UFT descriptive programming Browser("creationtime:=-1") not always working SOUMYADEEP 0 3,116 01-20-2017, 01:53 AM
Last Post: SOUMYADEEP
  Inserting variable values into Descriptive Programming Functions eske99 2 3,569 12-18-2015, 01:47 PM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)