Forum Discussion

vondie's avatar
vondie
Contributor
8 years ago
Solved

Drop-downs Not Recognizing Value is Selected

I am not sure if this is an issue with TestComplete or the website we are testing on but I figured I would give the community a chance as I always come away with an answer. 

 

I am currently testing a website that requires entering data into fields and going through multiple pages. The "Next" button does not enable until all required fields have been filled in with data. I am currently running a data-driven test to feed data into the site for each scenario. The site contains drop-down menus, two of which do not register on the site that a selection was made when selecting the value via the automation test. This causes the script to fail because they are required fields and the Next button doesn't enable. The other drop-down menus work just fine and the system recognizes a value was selected.  I have found that if I manually click on the same value again while the test is running, it recognizes the value and enables the Next button. I cannot reproduce this with a manual test. Does anyone know what could be occurring here? It's preventing us from truly automating the testing for this website since the script requires manual intervention on the pages with these drop-downs. I have tried "rigging" the test by adding a second action on the same object with Keys([Down][Tab]) which did not work. 

  • Hi all. I did not figure out a solution to this issue but the issue resolved itself when the developers changed the way the Next button works. The drop-downs are still causing issues but they implemented an OnClick Next Button validation that picks up on the values. Thanks for your help! 

4 Replies

  • NisHera's avatar
    NisHera
    Valued Contributor

    manually go to that page and only run peace of code which select value for only particulate drop down.

    what is the result? if works may be you have to adjust timing of script execution.

    if not TC is not recognizing your object or it's properties  

    • Colin_McCrae's avatar
      Colin_McCrae
      Community Hero

      Sounds like some sort of custom trigger is not being triggered with the automated version.

       

      You say it works when you "click" on it. What method are you using to make the selection in the dropdown? If that makes the selection, but the button does not enable, it sounds like the mouse click itself may be the trigger. Have you tried making the selection (assuming you already have it doing this) then applying a "click" to the dropdown object once your selection is in place?

       

      There are obviously triggers on all these fields which cause the continue button to enable. If you have access to the dev team, they should be able to tell you exactly what these triggers are so you can match them ....

      • vondie's avatar
        vondie
        Contributor

        NisHera - The objects are definitely being recognized in TestComplete so I don't think that's an issue. I have also tried adding delays before and after the drop-down selection and it's still failing. 

         

        Colin_McCrae - When I say "click" I mean manually intervening and clicking on the drop-down and selecting the value while the test is waiting for the next page's objects to load. I tried what you said and added a manual click after and also tried adding one before and neither one worked, unfortunately. It was a great suggestion, regardless. I have attached a screenshot of part of the test for more context. The drop-downs in question are highlighted in yellow. 

         

        I have a bug open with a video attached but the dev team is saying that they can't reproduce it manually so they do not want to spend time fixing it. I would be happy to find a workaround as long as I could get past this without intervention.