Forum Discussion

IuliaVascan's avatar
IuliaVascan
Occasional Contributor
4 years ago

Get Color of an object (python)

Hi,

I have the object from the below pictures with the object browser methods (.NET) from the third picture. This object is changing its color from green to grey, it's the same object but with different colors. How can I get the color of the object? 

I tried to use Aliases.SoSwEETApplication.MainForm.guiObj.Battery.bt_grey.get_BackColor but it's not working.

 

I also find https://smartbear-cc.force.com/portal/KbArticleViewer?name=Get-a-control-s-background-color&sp=testcomplete this article, do you know if this is also in a python version?

 

Thank you!

  • Hi,

     

    object browser methods (.NET)

    As this is .Net application, the chances are high that control provides some property/method that returns control's background color. Talk to developers or read control's documentation.

     

    but it's not working.

    From its name, get_BackColor() seems to be a relevant method. What have you tried? What exactly was not working?

     

    do you know if this is also in a python version?

    I do not use Python thus I don't have Python version of the referenced code, but I believe that migration from JScript to Python should not be too complex.

     

2 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    object browser methods (.NET)

    As this is .Net application, the chances are high that control provides some property/method that returns control's background color. Talk to developers or read control's documentation.

     

    but it's not working.

    From its name, get_BackColor() seems to be a relevant method. What have you tried? What exactly was not working?

     

    do you know if this is also in a python version?

    I do not use Python thus I don't have Python version of the referenced code, but I believe that migration from JScript to Python should not be too complex.