SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Advanced Member
    Join Date
    Aug 2007
    Location
    Six Feet Under
    Posts
    717
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Oversmart QTP clicks on disable objects

    Using QTP 11.00

    on my Web application while clicking on the "Save Button" via QTP scripts, application asks for confirmation (JavaScript alert dialog box) to save the order form data.

    Next step is click on the "New Order Button" .

    But QTP does click on the new order button, without bothering about the JavaScript Alert dialog, but when we try to click anywhere on the pages its disabled, we need to first close the dialog and then move to the next step.

    QTP should behave like human user and should not be over-smart, because our applications will be ultimately used bu human not robots

    Do we have any settings which i am missing, or its a QTP 11 bug, or its just in my case.
    Thanks,
    Manish Bansal

    Checkout Blog Page At
    http://www.softtechlabs.com

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

    Re: Oversmart QTP clicks on disable objects

    What is your current replay type ?

    Setting this to Mouse may help you.

  3. #3
    Advanced Member
    Join Date
    Aug 2007
    Location
    Six Feet Under
    Posts
    717
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Oversmart QTP clicks on disable objects

    No its normal, not a mouse replay type.
    i believe QTP is using DOM objects to interact with the objects, if i do it via that approach even i can run my java-script irrespective of any alerts.

    But this is not expected behavior.
    Thanks,
    Manish Bansal

    Checkout Blog Page At
    http://www.softtechlabs.com

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

    Re: Oversmart QTP clicks on disable objects

    [ QUOTE ]
    on my Web application while clicking on the "Save Button" via QTP scripts, application asks for confirmation (JavaScript alert dialog box) to save the order form data.

    Next step is click on the "New Order Button" .

    But QTP does click on the new order button, without bothering about the JavaScript Alert dialog, but when we try to click anywhere on the pages its disabled, we need to first close the dialog and then move to the next step.


    [/ QUOTE ]

    Manish,

    Sorry, I don't get the issue. Does this 'JavaScript Alert dialog' appear when you do manually also? Do you mean to say that you have instructed QTP to close this dialog, but QTP ignores/skips this statement & doesn't close it?
    Rajkumar

  5. #5
    Advanced Member
    Join Date
    Aug 2007
    Location
    Six Feet Under
    Posts
    717
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Oversmart QTP clicks on disable objects

    No Rajkumar,

    I am saying No matter if dialog box comes, QTP keeps on running, doesn't throw error.

    dialog box (JavaScript confirm is application functionality ) typically, when a dialog box appears, you can not click anywhere until you close this dialog box (which is as expected in case of manually testing) but when running automation script, qtp does not wait for this dialog box to go.


    I am not handling dialog box/ or sometimes dialog box comes very late, well handling dialog is not i am worried of. i can put more sync/wait it will work.
    Thanks,
    Manish Bansal

    Checkout Blog Page At
    http://www.softtechlabs.com

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

    Re: Oversmart QTP clicks on disable objects

    [ QUOTE ]
    QTP should behave like human user and should not be over-smart, because our applications will be ultimately used bu human not robots

    [/ QUOTE ]

    Yes, now I understand your question.

    The way QTP works is entirely different from the way we work. We go with the visual identifiers & interact with the objects accordingly. Whereas when QTP performs an operation, it goes behind the screen, parses the HTML, then locates the object & performs the required action. That's why it misses the modal window & also it's able to work on hidden objects.
    Rajkumar

  7. #7
    Advanced Member
    Join Date
    Aug 2007
    Location
    Six Feet Under
    Posts
    717
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Oversmart QTP clicks on disable objects

    Well, i understand Rajkumar, and i am looking for the solution.

    It should not work this way, this is an issue with QTP11, not sure with earlier version, but sure this behavior is only with Web objects and not with windows.

    I think if QTP doesn't have any settings then probably i need to raise HP ticket, otherwise people who are using recovery for handling unexpected dialog "On Error" will never able to invoke recovery automatically.

    I hope it make sense.
    Thanks,
    Manish Bansal

    Checkout Blog Page At
    http://www.softtechlabs.com

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

    Re: Oversmart QTP clicks on disable objects

    The previous versions also work the same way.

    This is an application functionality & we have to handle these windows. QTP can't handle them automatically. As you have mentioned, add Sync or Wait statements & then handle the window.

    [ QUOTE ]
    I think if QTP doesn't have any settings then probably i need to raise HP ticket, otherwise people who are using recovery for handling unexpected dialog "On Error" will never able to invoke recovery automatically.

    [/ QUOTE ]

    Handling modal windows itself can be problematic. And there are are different ways to handle it, including what Avinash has suggested.

    What you have stated w.r.t to Recovery scenario is true, only when execution is blocked. But your case is different,
    1) You are not handling the Window
    2)QTP is executing the next statement

    If we expect QTP to handle a Window which we have not handled, then we are talking AI.

    May be I totally miss something here [img]/images/graemlins/smile.gif[/img]
    Rajkumar

  9. #9
    Moderator
    Join Date
    Sep 2001
    Location
    Doncaster, UK
    Posts
    5,839
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Oversmart QTP clicks on disable objects

    [ QUOTE ]

    But QTP does click on the new order button, without bothering about the JavaScript Alert dialog

    [/ QUOTE ]

    Manish I'm a little confused here, are you programmatically or via a recovery scenario dealing with the Alert dialog?

    I know you have a lot of QTP experience so I can't understand why you would expect QTP to deal with it [img]/images/graemlins/confused.gif[/img]

    Mark Smith

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

    Re: Oversmart QTP clicks on disable objects

    Especially this case of a confirmation window. That should never be handled by error recovery. It is expected functionality that should be scripted and in fact fail if it does not appear.

    Maybe if you added a visible/enabled property to your New Order Button definition it would work as you expect.

 

 
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.40 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 7.14%
vBulletin Optimisation provided by vB Optimise v2.7.1 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 04:18 PM.

Copyright BetaSoft Inc.