SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Jun 2007
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Set Value of \'Random\' Text Fields

    I'm very new to QTP and a search didn't seem to bring up what I was seeking.

    I have a need to create a test that sets the value of 3 'random' text fields on a page. When a user accesses the site, a security page may appear that asks the user to enter some pre-defined answers to some security questions. 3 text fields are always present. The 3 text fields appear randomly, but are always from the same set of 8 questions. The text fields are always named the same depending on the question asked; so, for example, if we ask "What high school did you attend?" the value of the text field is answer7...and so on and so forth.

    Here are 2 scenarios:

    1. User A enters the site and gets 3 questions:
    Mother's Maiden Name (answer2)
    High School Attended (answer7)
    First car driven (answer1)

    2. UserB enters the site and gets 3 questions:
    Mother's Maiden Name (answer2)
    Favorite color (answer8)
    Middle Name (answer3)

    Things I have completed thus far:
    1. set up a conditional -- page doesn't always appear
    2. added data values in the test worksheet for each answer (C through J)

    If True Then
    Browser("Special Authentication").Page("Special Authentication").WebEdit("answer1").Set DataTable("J", dtLocalSheet)
    Browser("Special Authentication").Page("Special Authentication").WebEdit("answer2").Set DataTable("H", dtLocalSheet)
    Browser("Special Authentication").Page("Special Authentication").WebEdit("answer3").Set DataTable("F", dtLocalSheet)
    Browser("Special Authentication").Page("Special Authentication").WebEdit("answer4").Set DataTable("G", dtLocalSheet)
    Browser("Special Authentication").Page("Special Authentication").WebEdit("answer5").Set DataTable("E", dtLocalSheet)
    Browser("Special Authentication").Page("Special Authentication").WebEdit("answer6").Set DataTable("C", dtLocalSheet)
    Browser("Special Authentication").Page("Special Authentication").WebEdit("answer7").Set DataTable("I", dtLocalSheet)
    Browser("Special Authentication").Page("Special Authentication").WebEdit("answer8").Set DataTable("D", dtLocalSheet)
    End If


    Has any one done this sort of thing before that would be willing to provide me with sample actions (expert mode or otherwise)? Or perhaps a discussion on the best kind of looping for this sort of thing...

    I'm using QuickTest Pro 8.2.

    Thanks,
    Eve

  2. #2
    Member
    Join Date
    May 2004
    Posts
    355
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Set Value of \'Random\' Text Fields


    My 2 cents:

    As you do not know what kind of questions you are going to get, it is better to use conditional statement for each of the questions and set them.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 07:53 PM.

Copyright BetaSoft Inc.