Forum Discussion

tuanvinh1008's avatar
tuanvinh1008
Contributor
3 years ago
Solved

How to verify the color of Progress bar control?

Hi all,

I want to verify the color of the progress bar control. It's green. The progress bar is in status bar like image

 

 

  • AlexKaras's avatar
    AlexKaras
    3 years ago

    Hi,

     

    What technology (.Net, C++, VB, ...) your tested application is created with?

    Can you talk to developers for their piece of advice of how color can be obtained?

    Is this progress bar of uniform color? (I.e. without those fancy gradients.) If it is, then you may take its picture and get a color of the first pixel. I.e.:

    var color = <progressBar>.Picture(0, 0, 5, 5).Pixels(2, 2);

    if (clGreen == color)

      ...

     

     

4 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    Are you able to see the progress bar with Object Spy?  You may be able to find a color attribute that way.

    • tuanvinh1008's avatar
      tuanvinh1008
      Contributor

      yes, I see it on Object spy but don't see any attribute or method to get the color

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        What technology (.Net, C++, VB, ...) your tested application is created with?

        Can you talk to developers for their piece of advice of how color can be obtained?

        Is this progress bar of uniform color? (I.e. without those fancy gradients.) If it is, then you may take its picture and get a color of the first pixel. I.e.:

        var color = <progressBar>.Picture(0, 0, 5, 5).Pixels(2, 2);

        if (clGreen == color)

          ...

         

         

  • jeanette17's avatar
    jeanette17
    New Contributor

    You can find the code for the updated, styled example on Github, and view it live. The custom video controls and <progress> element are now contained color for styling the progress bar's background color as it increases.