rkb Posted March 24, 2017 Posted March 24, 2017 I am using Selenium and it has been suggested that I use AutoIT to enter text in the dialog that pops up for authentication. Here is my code: autoIt.Send("<user>"); autoIt.Send("{TAB}"); autoIt.Send("<password>"); autoIt.Send("{Enter}"); This seems to work for the user name but I am guessing since the password contains a '#' character only part of the password is being sent. Should the '#' character be escaped somehow? Thank you. Kevin
InunoTaishou Posted March 24, 2017 Posted March 24, 2017 If you're going to interact with a window it'd be better to use ControlSetText instead of Send. If you've got the full version of autoit installed open up the AutoIt Window Info Tool and get the window title and the control ids of the two input boxes for your window. Like in my example image, to fill in the username (because that's the info I have in the image) ControlSetText("Authentication", "", "[Class:Edit; Instance:1]", "<user>") And the password control is instance 2 (not in the screenshot, but that's what I know because I created that window). So it would be like this ControlSetText("Authentication", "", "[Class:Edit; Instance:2]", "<password>")
rkb Posted March 29, 2017 Author Posted March 29, 2017 (edited) I am not sure if I follow. I have attached the dialog in question and it seems if I use the "Finder Tool" nothing changes for either the user or password input. Maybe this will come from the reply but I don't understand all of the 4 arguments for ControlSetText (title, text, control, controlText)? Edited March 29, 2017 by rkb Clarification
Danyfirex Posted March 29, 2017 Posted March 29, 2017 (edited) Hello. If you're site use Basic Auth You can pass credentials in the URL like https://username:password@www.something.com:8080 Edit: Main question answer. If you need to send specials character add SEND_RAW flag. like Send("####",1) Saludos Edited March 29, 2017 by Danyfirex Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
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