SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 10 of 10
  1. #1
    Senior Member
    Join Date
    Dec 2008
    Posts
    292
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Having problesm with post-loading on page

    Hey all,

    Im having a problem that I cannot figure out and Im hoping someone here can point me in the right direction.

    Here's the situation. I'm testing some checkout functionality and when you enter your address an event is triggered to give you options to pick your shipping via radio buttons. These buttons are not shown when the page is loaded and are only loaded when the address has been entered by a user.

    The problem I have is when I record the object, it doesn't recognize it. It DOES recognize it on the validation error because this block is now being displayed when you click the submit button. However, it never loads until you physically enter the shipping address, thus not recognizing the radio button on the initial run through. So its a little tricky - I'm not sure how QTP recognizes objects that aren't loaded as soon as the page is...

    Has anyone had any experience with this they can share? [img]/images/graemlins/confused.gif[/img] I'd appreciate any feedback you guys have.

    Thanks!

  2. #2
    Senior Member
    Join Date
    Jun 2007
    Location
    IL, US
    Posts
    408
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Having problesm with post-loading on page

    Your question is not clear. What is the exact problem you are facing?

    1) are you unable to automate the step or
    2) Are you unable to identify webradio group during runtime

    If possible can you paste the code and point to the lien where you have the problem.

  3. #3
    Senior Member
    Join Date
    Dec 2008
    Posts
    292
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Having problesm with post-loading on page

    [ QUOTE ]
    Your question is not clear. What is the exact problem you are facing?

    1) are you unable to automate the step or
    2) Are you unable to identify webradio group during runtime

    If possible can you paste the code and point to the lien where you have the problem.

    [/ QUOTE ]

    Honestly the code is just recorded, so there isn't anything fancy there.

    The actual problem is, these radio buttons Im trying to click on do not show when the page is first loaded.

    They ONLY show when I enter my shipping address. For some reason, when I record typing in my address (allowing this block to become visible) and clicking the radio button it comes back with an error saying it can't find the button. I even verified that it is the correct button through the object spy but no matter what I do it won't click that button because it doesn't think it exists.

    Does that help or make more sense on what Im trying to accomplish? I appreciate the reply and the help. [img]/images/graemlins/smile.gif[/img]

  4. #4
    Member
    Join Date
    Feb 2008
    Posts
    33
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Having problesm with post-loading on page

    What I understand from your description is that, you are willing to select the radio button which does not exist on the page.
    These radio buttons seem to be dynamic objects on the page(As u say they appear only when shipping address is entered).
    The point here is one can not perform any action on the object which does not exist at a point of time. So, logically, application flow should be followed to click the radio button. Meaning, the attemt to select a radio button should be made only after entering the shipping address.

    Moneesha

  5. #5
    Super Member FredMan's Avatar
    Join Date
    Oct 2007
    Location
    Lenexa, Kansas
    Posts
    1,218
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Having problesm with post-loading on page

    This appears to be a timing issue. If you can perform the same actions manually without errors but the script cannot click on the button then maybe the script is trying to click on the button before it is visible. Try using the WaitProperty method to wait for the button to become visible.
    Onward thru the fog...

  6. #6
    Senior Member
    Join Date
    Dec 2008
    Posts
    292
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Having problesm with post-loading on page

    Hey guys,

    Thank you for your feedback. I've actually tried both suggestions.

    Moneesha, you are absolutely correct. The problem is, even after I automate the shipping address it still won't click the radio button when it appears... I guess that's the problem.

    FredMan, I also thought the exact same as you. So I have tried a wait timer and it still didn't work.

    Perhaps I just need longer wait timers? Ill be playing around with this again today so hopefully I can figure something out. Its the first time I've had this issue, but also the first time that objects dynamically appear on the screen like this... Didn't expect this to be so tough... heh... [img]/images/graemlins/smile.gif[/img]

  7. #7
    Senior Member
    Join Date
    Jun 2007
    Location
    IL, US
    Posts
    408
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Having problesm with post-loading on page

    Jason,

    I think the properties of the WebRadio group(displayed after you enter the shipping address through QTP) are different for the properties of the Object in your Object Repository. Please verify the properties of the webradio group in the OR

    Thanks
    Pavan

  8. #8
    Senior Member
    Join Date
    Dec 2008
    Posts
    292
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Having problesm with post-loading on page

    Hey Pavan
    I checked that as well..

    My Code is
    Browser("").Page("").WebRadioGroup("shippingQuote8 874").Select "1016" (the 1016 is what QTP recorded)

    In the OR
    Name: shippingQuote8874
    Class: WebRadioGroup

    Am I missing something painfully obvious? [img]/images/graemlins/smile.gif[/img]

  9. #9
    Senior Member
    Join Date
    Jun 2007
    Location
    IL, US
    Posts
    408
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Having problesm with post-loading on page

    In the OR select the shippingQuote8874 Object(and note down the Properties Name/ values in the Test Object Details sections)

    Then execute the script when error is raised(after the shipping address is entered) stop the script. SPy on the object and verify that the object spy displayed the same values for the proprties you noted down from the OR

    Thanks,
    Pavan

  10. #10
    Senior Member
    Join Date
    Dec 2008
    Posts
    292
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Having problesm with post-loading on page

    Hey Pavan,

    Thanks for your feedback. I did what you suggested and found they were matching.

    So I re-recorded that block and now, for whatever reason its working [img]/images/graemlins/smile.gif[/img] I honestly have no idea why it wasn't working correctly the first time. I have an option for 4 different radio buttons and each of them is working correctly now. Can click them without any issues...

    The only semi-concerning thing is on my results page I get a warning message saying there was an error but the script did run fine. Very bizarre on what happened... The warning doesn't give me any info on how to fix it.. just says Action1Summary - Warning 1. At least it's working for the most part, I just wanted to write and say thank you for the help! [img]/images/graemlins/smile.gif[/img]

 

 

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 12:05 PM.

Copyright BetaSoft Inc.