techburgher Posted November 12, 2020 Share Posted November 12, 2020 Hello, I am simply trying to click the Login button on a window, using AutoIt with Powershell -- and it is not working! Here is the control information: >>>> Control <<<< Class: WindowsForms10.STATIC.app.0.13965fa_r18_ad1 Instance: 4 ClassnameNN: WindowsForms10.STATIC.app.0.13965fa_r18_ad14 Name: linkLogin Advanced (Class): [NAME:linkLogin] ID: 2756140Text: Login Position: 375, 149 Size: 42, 17 ControlClick Coords: 7, 12 Style: 0x5601000D ExStyle: 0x00000000 Handle: 0x00000000002A0E2C $hWnd = Wait-AU3WinActive -Title "Noble Login" -Timeout 5 $hLogin = Get-AU3ControlHandle -WinHandle $hWnd -Control "Login" Invoke-AU3ControlClick -WinHandle $hWnd -ControlHandle $hLogin hWnd correctly receives a value, but hLogin never does! What is wrong with the call to Get-AU3ControlHandle? Thank you! Link to comment Share on other sites More sharing options...
Danp2 Posted November 12, 2020 Share Posted November 12, 2020 47 minutes ago, techburgher said: $hLogin = Get-AU3ControlHandle -WinHandle $hWnd -Control "Login" Shouldn't you be using the control's name instead of it's text, ie -- $hLogin = Get-AU3ControlHandle -WinHandle $hWnd -Control "linkLogin" Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
techburgher Posted November 12, 2020 Author Share Posted November 12, 2020 Quote Shouldn't you be using the control's name instead of it's text, ie -- Per the documentation, using the control name is not a valid way of referencing a control: Quote Using the AutoIt Window Info Tool you can move your mouse around the window you are interested in and you will be given information of the control that is currently under your mouse. Information on controls is given in a number of ways, these are: Control ID ClassNameNN Text Link to comment Share on other sites More sharing options...
Danp2 Posted November 12, 2020 Share Posted November 12, 2020 31 minutes ago, techburgher said: Per the documentation, using the control name is not a valid way of referencing a control Which documentation are you quoting? FWIW, I was basing my code on the example found here. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now