Forum Discussion

tomasino's avatar
tomasino
Occasional Contributor
14 years ago

JavaScript Select DropList Control Disabled - Stops Test Action

Hello,



I have encountered a JavaScript control that is making me crazy!

Here's the deal.



It's a Select dropList that exists inside of a Table cell.

e.g.

     <select disabled="true" ....>



However, when the parent control is clicked, the disabled attribute is simply removed..not set to "false".

So TestComplete is left holding a property that says the control is still disabled and it just stops with the error "the control is disabled".



I've tried all the prescribed Delays and Wait methods..but nothing matters.  It's disabled as far as TestComplete is concerned.



How can I tell TestComplete to ignore this at the property level AND still locate the control via the map (which appears to be fine)?



Thanks.






2 Replies

  • Hello Tomas,



    However, when the parent control is clicked, the disabled attribute is simply removed..not set to "false".



    I've created a sample page and checked how this can be worked around - in my case, adding a delay (I intentionally did so that the "select" element would not be updated immediately) after the action that triggers the element's update solved the issue.





    I've tried all the prescribed Delays and Wait methods..but nothing matters.  It's disabled as far as TestComplete is concerned.



    Can you post here the code that doesn't work? In the meantime, try calling the RefreshMappingInfo method of the mapped object that corresponds to the "<select>...</select>" object after clicking the parent control.
  • tomasino's avatar
    tomasino
    Occasional Contributor
    Hey Thanks for the info..



    Sorry to hear a simple delay works for you.  Sure don't cut it here.



    I'm in KeyWord test land..for the most part..otherwise JScript.   No problems dropping scriptlets though.



    So dropped the RefreshMappingInfo method call of the mapped object that corresponds to the
    "<select>...</select>" object after clicking the parent
    control...  n' the answer was:  yep it's still there. Can't seem to let it go.  Tried remapping the object at the right time but still didn't work. 



    I think this is just some very funky javascript/html gen stuff.  Not much I can do about it.



    Already worked around this issue using your "Parse HTML Tables" examples..  (the control was for running a query against the table data.)



    Thanks again.