SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Jul 2003
    Location
    Boston
    Posts
    76
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How can I look for a particular user and delete him

    I have a web application in which I would like to look for a user and delete him.
    I am trying to automate it.
    The logic that I am trying to use is
    " If the userID is not an Admin then delete him."

    I am trying to capture the userID with GetTOProperty ("innertext")
    but it only captures the current user and stores that value only(The one that I deleted when capturing the script)

    I am using QTP8.2; can someone suggest a way out.
    Thanks
    Adai

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

    Re: How can I look for a particular user and delete him

    By any Chance does QTP Identify the User List as WEB Table ?
    Thanks,
    Bond

  3. #3
    Member
    Join Date
    Jul 2003
    Location
    Boston
    Posts
    76
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How can I look for a particular user and delete him

    no it recognizes as web element
    Adai

  4. #4
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: How can I look for a particular user and delete him

    Your Qs is not clear. Explain with some example scenario.

  5. #5
    Member
    Join Date
    Jul 2003
    Location
    Boston
    Posts
    76
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How can I look for a particular user and delete him

    in the web application...i have a set of users.The detail is displayed like this in the web page
    userID userName Email ActionButton(mouse over the action button gives the option to Edit or Delete )

    userID,userName,Email are all Text
    I am trying to develop a script that would scan the user ID, see if it is not "Admin" and delete it.

    I recorderd a script that deleted a user and tried to repeat the process with a loop that would go on until "Admin" is the only user left.
    I used the GetToProperties and captured the innertext of the userID, but when I go for the next iteration, I am not able to grab the next userID.

    example:
    say the list has
    UserID1
    UserID2
    UserID3
    Admin

    when I run the script it first deletes UserID1(that is the one that I have captured with GetToProperties)
    the next iteration should capture UserID2,...but I am not able to do so
    Also I am not able to relate the action button corresponding to the userID.
    Adai

  6. #6
    Member
    Join Date
    Sep 2002
    Location
    Australia
    Posts
    70
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How can I look for a particular user and delete him

    Hello everyone , i'm quite new to QTP ....and here goes my first post on a QTP forum

    Record the web table (say as UsernameTable) that contains all these columns user id....action etc. record the delete link and following should help :

    i = 1 '
    Col = 4 'Delete link exists in fourth column

    Do While i lessthanequalto RowCount
    CellVal = Browser("your object").Page("").WebTable("UsernameTable").GetCel lData(i,Col) 'get cpontents of the user id column

    If CellVal noteqaualto "admin"
    'there must a property in the delete link corresspoding to each user id that must be changing for each row ,
    'change the descrption of the object in Object repository using SetTOProperty
    'click on the delete link
    End If
    i = i+1
    Loop

    -Bhartendu

  7. #7
    Junior Member
    Join Date
    Jul 2006
    Location
    Islamabad
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How can I look for a particular user and delete him

    I have a sinerio in which user is added from client side. but will be approve By admin side the problem is that on admin side there is a list of user which have to approved but i wana approve the user which i added recently ....
    1. the list have only links to approve or delete or view.
    so when run the text it tries to add the one which i add during recording. kindly replay me in detail.
    Be Happy

 

 

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 01:46 PM.

Copyright BetaSoft Inc.