SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Member
    Join Date
    Oct 2011
    Posts
    43
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Login passed eventhough not have useridandpassword


    Hi,
    In my application,I have dialog box for entering user id and password,but I asked to give input box to enter the userId and password,
    when I run the application,sometimes I am entering userid and password...It is passing
    Sometimes eventhough I am not entering userid and password it is passing,I am able to continue the work.
    How?
    My Code
    Browser("").Page("").Link("login").Click
    print "login linkClicked"

    wait(20)
    If Browser("").Dialog("").Exist(10) Then
    Print "I am going to set userid and password"
    Uname=Inputbox("Please Enter Username")
    Password=Inputbox("Please Enter Password")
    Browser("").Dialog("").WinEdit("").Set Uname
    Browser("").Dialog("").WinEdit("").Set Password

    Else
    Print "Where is dialogbox"

    End If
    Any help
    Thank you
    Uma

  2. #2
    Moderator
    Join Date
    Jan 2007
    Location
    Pittsburgh, PA
    Posts
    2,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Login passed eventhough not have useridandpassword

    You need to have verification/check pointís in-order to make the test script as pass or fail during the run. As long as the objects that you have in the script exist on the browser then QTP is going to mark the test as passed.

    The script is not checking anything because you donít have any checkpoints in the script. Please read the QTP tutorial to understand the basic scripting process better.

  3. #3
    Member
    Join Date
    Oct 2011
    Posts
    43
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Login passed eventhough not have useridandpassword

    Hi Reddy,
    This is my first project in QA.I have to learn a lot,

    By the way,this is my verification

    If Browser("").Page("").WebElement("outerhtml:=<B& gt;0</B>","html tag:=B").Exist(1) Then

    R1=Browser("").Page("").WebElement("outerhtml:=&lt ;B>0</B>","html tag:=B").GetROProperty("innertext")
    If R1=0 Then
    reporter.ReportEvent micPass,"Test got result:"&R1,"Test Passed"
    Else

    reporter.ReportEvent micFail,"Test got result:"&R1,"Test Failed"

    End If


    Else
    reporter.ReportEvent micFail,"Test got result:"Critical"Test Failed"
    End If

    Thank you
    Uma

  4. #4
    Super Member QAGanesh's Avatar
    Join Date
    Sep 2010
    Posts
    1,898
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Login passed eventhough not have useridandpassword

    Uma,

    One thing here do u have only the outerhtml property to find the webelement

    U can try using the escape character '\' as '< >' are special characters

    If Browser("").Page("").WebElement("outerhtml:=\<B \>0\<\/B\>","html tag:=B").Exist(1) Then

    R1=Browser("").Page("").WebElement("outerhtml:=\&l t;B\>0\<\/B\>","html tag:=B").GetROProperty("innertext")
    If R1=0 Then
    reporter.ReportEvent micPass,"Test got result:"&R1,"Test Passed"
    Else
    reporter.ReportEvent micFail,"Test got result:"&R1,"Test Failed"
    End If

    Else
    reporter.ReportEvent micFail,"Test got result:"Critical"Test Failed"
    End If
    Thanks,
    Ganesh Iyer
    Winds of Change

  5. #5
    Super Member
    Join Date
    Dec 2005
    Location
    USA
    Posts
    1,407
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: Login passed eventhough not have useridandpassword

    [ QUOTE ]

    when I run the application,sometimes I am entering userid and password...It is passing
    Sometimes eventhough I am not entering userid and password it is passing,I am able to continue the work.


    [/ QUOTE ]

    you problem seems that your application is taking the credentials from cookies some time. clear the cookies before you proceed.
    ------------
    Chikki
    when things gets harder ,the harder gets going

  6. #6
    Member
    Join Date
    Aug 2009
    Location
    Bangalore, Karnataka, India
    Posts
    94
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Login passed eventhough not have useridandpassword

    Ya, u can try what chikki is telling.

    Ways to clear cookies

    Clear cookies using "WebUtil.DeleteCookies"
    or
    Empty the Temp file in your C drive.
    --------------------------------------------------
    K. Raghu Ram
    Automation & Performance Test Engineer
    --------------------------------------------------

  7. #7
    Member
    Join Date
    Oct 2011
    Posts
    43
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Login passed eventhough not have useridandpassword

    Thank you all of you.
    Ganesh,
    I have [Innerhtml=0,Innertext=0] to find the web element,
    Now i am using Escape characters.

    Chikki And Raghu,
    I have deleted cookies,
    1)C:\Temp deleted
    2.Tools-internetoptions-general tab-browsing histroy-
    1.Password,saved form,Internet files,Cookies.....Deleted

    but stilll it is automatically login eventhough I am not giving userid and password.

    Any Help?
    Thank You
    Uma

  8. #8
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,557
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: Login passed eventhough not have useridandpassword

    It could be browser session based rather than cookie, check with your developer. Can you reproduce manually? Is it not an issue if you go to a different browser(ff, chrome, etc)?

    Also you don't initialize your uname and password variables to blank before you retrieve them through the input box, possible they're still hanging around in memory.

  9. #9
    Moderator
    Join Date
    Oct 2010
    Location
    Norway
    Posts
    3,265
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: Login passed eventhough not have useridandpassword

    What Dialog is this & Why are you checking for this Dialog box?

    If Browser("").Dialog("").Exist(10) Then

    When the script is executed, do you see the Fields?
    Rajkumar

  10. #10
    Member
    Join Date
    Oct 2011
    Posts
    43
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Login passed eventhough not have useridandpassword


    Hi Raj,
    If Browser("").Dialog("").Exist(10) Then

    After it executes the above line,
    Some time able to see the dialogbox,at that time I am able to login normally,
    sometime it is not showing the dialog box,it is skipping and directly goes to result page.

    Hi,
    My Scripts are compatible with IE7.
    I will check manually.

    Thank You
    Uma

 

 
Page 1 of 2 12 LastLast

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 8.33%
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 10:28 AM.

Copyright BetaSoft Inc.