alex1122 Posted February 28, 2020 Share Posted February 28, 2020 (edited) I need to write Username and password with my selenium test in popup log , for this I use Auto it script: Sleep(3000) Send("DZC\yyyyyyyy") // Username Sleep(1000) Send("{Tab}") Sleep(1000) Send("xxxxxx") // Password Sleep(1000) Send("{Enter}") It works if I open browser with "hands" go to url and after that I run the script, in this statement it writes Username and password in necessary fields, but it doesn't works if I run my selenium test, so I have automatically opened link in google chrome, after that I run my AutoIT script, but it doesn't works. I think that, with "hands" and automatically opened browsers have differences. So, in my opinion I need to write in my script connection/navigation way to my opened browser login and password fields or something like that. As I understand it is impossible to write username and password, because if i open chrome browser and url using my selenium test "chrome is being controlled by automated test software" I home someone can help me! Edited February 28, 2020 by Jos Link to comment Share on other sites More sharing options...
alex1122 Posted February 28, 2020 Author Share Posted February 28, 2020 (edited) 1 hour ago, alex1122 said: I need to write Username and password with my selenium test in popup log , for this I use Auto it script: Sleep(3000) Send("DZC\yyyyyyyy") // Username Sleep(1000) Send("{Tab}") Sleep(1000) Send("xxxxxxx") // Password Sleep(1000) Send("{Enter}") It works if I open browser with "hands" go to url and after that I run the script, in this statement it writes Username and password in necessary fields, but it doesn't works if I run my selenium test, so I have automatically opened link in google chrome, after that I run my AutoIT script, but it doesn't works. I think that, with "hands" and automatically opened browsers have differences. So, in my opinion I need to write in my script connection/navigation way to my opened browser login and password fields or something like that. As I understand it is impossible to write username and password, because if i open chrome browser and url using my selenium test "chrome is being controlled by automated test software" I home someone can help me! Edited February 28, 2020 by alex1122 Link to comment Share on other sites More sharing options...
Danp2 Posted February 28, 2020 Share Posted February 28, 2020 As written, your script will send the output to the currently active window, which may not be the browser. Suggest that you look at the WinActivate function. P.S. Also suggest that you change your password now that you've exposed it the the entire world. 😲 seadoggie01 and Musashi 2 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
alex1122 Posted February 28, 2020 Author Share Posted February 28, 2020 24 minutes ago, Danp2 said: As written, your script will send the output to the currently active window, which may not be the browser. Suggest that you look at the WinActivate function. P.S. Also suggest that you change your password now that you've exposed it the the entire world. 😲 Maybe you can write how it approximately looks? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 28, 2020 Moderators Share Posted February 28, 2020 (edited) @alex1122 Why would you report your own thread?? Also, as stated above, you need to edit your posts and remove the username and password. Not very smart to post that. Edited February 28, 2020 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
seadoggie01 Posted February 28, 2020 Share Posted February 28, 2020 You could probably take a look at using _WD_Alert() 1 minute ago, alex1122 said: Maybe you can write how it approximately looks? Um... this isn't a coding service Try it and we're happy to help, otherwise find someone on Upwork or a similar site All my code provided is Public Domain... but it may not work. Use it, change it, break it, whatever you want. Spoiler My Humble Contributions:Personal Function Documentation - A personal HelpFile for your functionsAcro.au3 UDF - Automating Acrobat ProToDo Finder - Find #ToDo: lines in your scriptsUI-SimpleWrappers UDF - Use UI Automation more Simply-erKeePass UDF - Automate KeePass, a password managerInputBoxes - Simple Input boxes for various variable types Link to comment Share on other sites More sharing options...
alex1122 Posted February 28, 2020 Author Share Posted February 28, 2020 2 minutes ago, JLogan3o13 said: @alex1122 Why would you report your own thread?? Also, as stated above, you need to edit your posts and remove the username and password. Not very smart to post that. How i can delete post or edit? Please Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 28, 2020 Moderators Share Posted February 28, 2020 Ehhh, click the Edit link? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
alex1122 Posted February 28, 2020 Author Share Posted February 28, 2020 1 minute ago, JLogan3o13 said: Ehhh, click the Edit link? Link to comment Share on other sites More sharing options...
Developers Jos Posted February 28, 2020 Developers Share Posted February 28, 2020 (edited) Not sure if this member is in the right group yet to allow the edit of a post ? (Edited the original post to get rid of the UID & PW) Jos Edited February 28, 2020 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
seadoggie01 Posted February 28, 2020 Share Posted February 28, 2020 (edited) @JLogan3o13 He's too new, no permissions yet 😐 Sorry, ninja-d Edited February 28, 2020 by seadoggie01 All my code provided is Public Domain... but it may not work. Use it, change it, break it, whatever you want. Spoiler My Humble Contributions:Personal Function Documentation - A personal HelpFile for your functionsAcro.au3 UDF - Automating Acrobat ProToDo Finder - Find #ToDo: lines in your scriptsUI-SimpleWrappers UDF - Use UI Automation more Simply-erKeePass UDF - Automate KeePass, a password managerInputBoxes - Simple Input boxes for various variable types Link to comment Share on other sites More sharing options...
alex1122 Posted February 28, 2020 Author Share Posted February 28, 2020 2 minutes ago, Jos said: Not sure if this member is in the right group yet to allow the edit of a post ? (Edited the original post to get rid of the UID & PW) Jos Can you do the same with the first my post. Thanks Link to comment Share on other sites More sharing options...
Developers Jos Posted February 28, 2020 Developers Share Posted February 28, 2020 Done, but check if you have the Edit in the meantime available as I see your group has changed. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 28, 2020 Moderators Share Posted February 28, 2020 4 minutes ago, Jos said: Not sure if this member is in the right group yet to allow the edit of a post ? (Edited the original post to get rid of the UID & PW) Jos I changed his membership, not sure why it didn't save. I just did it again and it looks like it went through. @alex1122 apologies on the confusion, you should now be able to Edit your own posts. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Nine Posted February 28, 2020 Share Posted February 28, 2020 Too late Alex I wrote them down ! I am just teasing you Danp2 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
alex1122 Posted February 28, 2020 Author Share Posted February 28, 2020 1 minute ago, JLogan3o13 said: I changed his membership, not sure why it didn't save. I just did it again and it looks like it went through. @alex1122 apologies on the confusion, you should now be able to Edit your own posts. Yes, now I have edit button) Link to comment Share on other sites More sharing options...
alex1122 Posted February 28, 2020 Author Share Posted February 28, 2020 Someone knows anything else how it is possible to manage with this problem? Thanks Link to comment Share on other sites More sharing options...
alex1122 Posted February 28, 2020 Author Share Posted February 28, 2020 Sleep(3000) Opt("WinTitleMatchMode",2) WinActivate("Google Chrome") Send("Username") Sleep(1000) Send("{Tab}") Sleep(1000) Send("Password Sleep(1000) Send("{Enter}") I use this construction, it put cursor on Username field, but but nothing else happens, it still doesn't write anything Link to comment Share on other sites More sharing options...
Bert Posted February 28, 2020 Share Posted February 28, 2020 (edited) Do this and it is MUCH easier - see if you can use a custom crafted URL string to pass your ID and password. I do this all the time in passing data to forms on websites when I'm testing. Example: https://www.test.com?id=1234&pw=asdr Now don't use the example and expect it to work on your issue. You HAVE to get the field ID and put that in the URL string then the text you want to populate in that field. Edited February 28, 2020 by Bert The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
alex1122 Posted February 28, 2020 Author Share Posted February 28, 2020 57 minutes ago, Bert said: Do this and it is MUCH easier - see if you can use a custom crafted URL string to pass your ID and password. I do this all the time in passing data to forms on websites when I'm testing. Example: https://www.test.com?id=1234&pw=asdr Now don't use the example and expect it to work on your issue. You HAVE to get the field ID and put that in the URL string then the text you want to populate in that field. It is imposible to get field ID, because it is popup log 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