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
    Dec 2007
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    how to insert for loop

    I want to check a password field by entering different sets of data i.e; If I enter below 6 characters in the password field then it should generate a error message.

    For this wht I did is I parameterised the password fields using data table by providing multiple sets of data.

    But when I tried to run the script. Everytime script is running from begining for each set of data.

    What I want is to check the multiple data in the same password page. Means how can I insert a for loop to this scenario.
    Ex: check the below for my script
    ---------------------------------
    'Script to change the password to a new password that is less than 6 characters

    Systemutil.Run("http://www.carnival.com")
    Browser("Carnival Cruise Lines:").Page("Carnival Cruise Lines:").Link("My Profile").Click
    wait(5)
    Browser("Carnival Cruise Lines:").Page("Carnival Cruise Lines").WebEdit("SignIn:tbEmailAddress").Set "nathrjy@tcs.com"
    Browser("Carnival Cruise Lines:").Page("Carnival Cruise Lines").WebEdit("SignIn:tbPassword").SetSecure "47a6b4ebd1beb39e942969a425e39760308d91500d0e2 ed8"
    Browser("Carnival Cruise Lines:").Page("Carnival Cruise Lines").Image("SignIn:btnLogin").Click 24,5
    Browser("Carnival Cruise Lines:").Page("Carnival Cruise Lines_2").Link("Change Password").Click
    wait(4)
    Browser("Carnival Cruise Lines:").Page("Carnival Cruise Lines_3").WebEdit("txtOldPassword").SetSecure DataTable("p_EncryptedText", dtGlobalSheet)
    Browser("Carnival Cruise Lines:").Page("Carnival Cruise Lines_3").WebEdit("txtNewPassword").SetSecure DataTable("NewPassword", dtGlobalSheet)
    Browser("Carnival Cruise Lines:").Page("Carnival Cruise Lines_3").WebEdit("txtVerifyNewPassword").SetSecur e DataTable("VerifyNewPasswrd", dtGlobalSheet)
    Browser("Carnival Cruise Lines:").Page("Carnival Cruise Lines_3").Image("cmdSubmit").Click 54,5
    wait(3)
    If Browser("Carnival Cruise Lines:").Page("Carnival Cruise Lines_3").WebElement("New Password should be").Exist Then
    Reporter.ReportEvent micPass,"New password is less than 6 digits","Passed"
    else
    Reporter.ReportEvent micPass,"Fail","Failed"
    End If
    Browser("Carnival Cruise Lines:").Page("Carnival Cruise Lines_3").Link("Logout").Click
    'Browser("Carnival Cruise Lines:").Close

  2. #2
    Junior Member
    Join Date
    Nov 2007
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: how to insert for loop

    Once the desired page gets loaded follo this

    1) Get Row Count - No of iteration to run and open the loop
    For IntLpCnt = 1 To RowCount

    2) Do the verification

    3) Increment the Count
    Datatable.<sheetname>.SetNextRow

    4) Next

 

 

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 11:52 PM.

Copyright BetaSoft Inc.