Alagosul Posted May 21, 2022 Posted May 21, 2022 Hello, im trying to make for me a small script, that helps me to upload photos. If i read this correctly: https://autoit.de/onlinehilfe/online/html/functions/ControlSend.htm Then the code must be: var handle = "[CLASS:#32770; TITLE:Open]"; AutoItX.ControlSetText(handle, "", "Edit1", path); AutoItX.ControlSend(handle, "", "Edit1", "{ENTER}"); But no luck. Tryed too with: AutoItX.WinActive("Open"); AutoItX.ControlSend("Open", "", "Edit1", path); AutoItX.ControlSend("Open", "", "Edit1", "{ENTER}"); Why is the ControlSetText + ControlSend not working? I tryed too with ControlClick but too didnt work... Any suggestion how to make that work? Window Info Tool: >>>> Window <<<< Title: Open Class: #32770 Position: 18, 10 Size: 960, 540 Style: 0x96CC02C4 ExStyle: 0x00010101 Handle: 0x000D06D8 >>>> Control <<<< Class: Button Instance: 2 ClassnameNN: Button2 Name: Advanced (Class): [CLASS:Button; INSTANCE:2] ID: 2 Text: Abbrechen Position: 839, 463 Size: 88, 26 ControlClick Coords: 18, 23 Style: 0x50030000 ExStyle: 0x00000004 Handle: 0x000C07DA Thank you
Vipan Posted July 4, 2022 Posted July 4, 2022 If you are integrating autoIt with Java and if you want to click on a button, pls try below: 1. Ensure you have AutoItX jar added to your java project. 2. Ensure you have registered AutoItX dll file in C:/Windows/System32 folder. 3. Ensure you are loading Jacob.dll in your java project After that, try using autoItx commands AutoItX autoIt= new AutoItX(); autoIt.winActivate("Open"); autoIt.winWaitActive("Open"); autoIt.controlClick("Open","","Button2","left"); For steps 1 to 3, refer to this link https://testguild.com/selenium-autoit/
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