SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Dec 2010
    Posts
    33
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    values given at run time

    Hai,
    i have to clarify one doubt.scenario is like below

    first i record one application which is having username and login field.here i want to give input for username and password from external source. it may pass through vbscript or someother source.how can i do that?

    i tried as below
    record any application
    write vbscript for giving input from outside
    afterthat just run the qtp script
    when username and password field come stop the qtp and pass the value from the script.
    i want to write sepeate script and save it as vbs file and call that script at the time of running qtp




    can i do that
    plz help me

  2. #2
    Senior Member
    Join Date
    Mar 2009
    Posts
    184
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: values given at run time

    Why not just drop the VBs code into the recording at the point it needs it? i.e. Get the values just before the password is needed then drop those values into the recorded code.

  3. #3
    Junior Member
    Join Date
    Jul 2008
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: values given at run time

    Hi,

    Create an excel sheet and store use name in cell(1,1), password in cell(1,2). In the script create the Excel object and read the values into the variables and u can pass those variables into your required fields. Here is script to create Excel object.
    Dim oE
    Set oE = CreateObject("Excel.Application")
    Set oB = oE.Workbooks.Open "C:\input.xls")
    Set oS = oB.WorkSheets(1)

    UserName = oS.Cells(1,1)
    Password = oS.Cells(1,2)

  4. #4
    Advanced Member
    Join Date
    Nov 2007
    Location
    India
    Posts
    686
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: values given at run time

    You can use excel sheet as suggested by @nkrishna

    OR

    you can use txt file too via FileSystemObject.

    OR

    you can use username,password as test parameters.
    Kind regards,
    Anand Tambey

    RSS Feed : Break To Make it Better
    A Lazy person could be the best automation professional, if he is not lazy in implementing his ideas to reduce his work. ~Anand Tambey

 

 

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 10.00%
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 11:54 PM.

Copyright BetaSoft Inc.