Forum Discussion

todd2's avatar
todd2
Contributor
2 years ago

Python code that will interrogate Chrome Dev Tools Console Elements for label value

Hello.  I have seen somewhere someone here trying to connect TestComplete via Python to Chrome Dev Tools and the answer seemed inconclusive.  There has to be a way beyond using MSAA which seems very hard to connect TestComplete to the Chrome browser Dev Tool Console Elements?  There is a label value inside the console that I want to get at with TestComplete.  I want to obtain that value, store it in a temporary variable inside TestComplete.  I want to call that temporary variable inside a keyword test script.  That variable will reset when the script reruns.  Any suggestions you can provide would be greatly appreciated.  I know Marsha R posted about this but it just seemed hard to implement.  Is there a GIT project out there somewhere that accomplishes this goal?

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    I was going to suggest to try and use contentDocument Property, to capture the element you need.

     

    Or you could add the WndClass property value of Dev Tools to MSAA, and TestComplete will identify majority of the controls.

     

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    What is the element that you are trying to capture in Chrome Dev Tools, are you able to provide a screenshot please?

    • todd2's avatar
      todd2
      Contributor

      Hello.  Due to my Company policy, I am not allowed to post work product.  If you could send me some sample code of TestComplete connecting to Chrome Dev Tools Console Element data via Python, that would be greatly appreciated.  Thank you.