Forum Discussion

whuang's avatar
whuang
Regular Contributor
6 years ago

Is there any way to disable a specific warning?

Hi Support,

 

There is one step in my test to perform a click on a disabled checkbox, and that is intentional. I know the checkbox is disabled, the step is to verify that disabled checkbox is not accessable, but TC returns me a warning "The action may be performed incorrectly, because the control is disabled.". Is there anyway to disable this specific warning or anyway to configure TC to accept this action as expected behaviour? I don't want to disable all the warining though, for any other warning I still need to know.

 

Thanks in advance!

  • whuang's avatar
    whuang
    6 years ago

    Hi TanyaYatskovska , for a easy and quick solution, I had just removed the click action for now, I am busy with a project right now, haven't try other suggestions yet.

  • Wamboo's avatar
    Wamboo
    Community Hero

    Can you check the value of the "Enabled" property in the code?

    This will be easier and (more correctly) to check the state of this object.

    • whuang's avatar
      whuang
      Regular Contributor

      Hi Wamboo , so there is no way to mimic a click on a disabled field?

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Why would you want to?  If the field is marked disabled in the DOM, then the "Enabled" property of the object will indicate that and there's no need to actually execute a click.  This is what property checkpoints and such are for.

         

        You can mimic the click... but TestComplete assumes that any attempt to interact with an object should result in a successful interaction... unsuccessful interactions will be logged as such.

  • Given the goal " the step is to verify that disabled checkbox is not accessable" is checking the enabled property and ensuring it is false insufficient?

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Thank you everybody for your assistance!

    whuang, which solution did you decide to use? Please share it with us or mark one of the current replies as a solution.

     

     

    • whuang's avatar
      whuang
      Regular Contributor

      Hi TanyaYatskovska , for a easy and quick solution, I had just removed the click action for now, I am busy with a project right now, haven't try other suggestions yet.

      • TanyaYatskovska's avatar
        TanyaYatskovska
        SmartBear Alumni (Retired)

        Thanks for the update. Please let us know if you return to this question for a deeper investigation. 

        Let me mark your reply as a temporary solution.