Jump to content

Unable to locate a combo box which is a WPF control using inspect.exe, spy++ or AutoIT inspector


Recommended Posts

I am not getting anyway to locate the element, please help if someone aware about it, below code was working before changing the component to WPF:

Func findEncoding($cpHandle, $encodingType, $upOrDown)
    activateClickWindow($cpHandle,1)
    Local $tmp = ControlGetText($cpHandle,"","[CLASS:ComboBox; INSTANCE:2]")
    Local $tmp1 = ''
    While Not($tmp == $encodingType)
        if Not($tmp == $tmp1) Then
            Send($upOrDown)
            Sleep(100)
            $tmp1 = $tmp
            activateClickWindow($cpHandle,1)
            $tmp = ControlGetText($cpHandle,"","[CLASS:ComboBox; INSTANCE:2]")
        Else
            $tmp1='Not Found'
            ConsoleWrite('Not Found')
            ExitLoop
        EndIf
    WEnd
    Return $tmp1
EndFunc;

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...