Techngo Posted June 24, 2020 Share Posted June 24, 2020 Hi Team, I know this is a old issue but cannot find a post that gave a solution so I am asking for your help. The IE element does not have Object Name, only 'Type' and 'data-automationid.' Heres the screenshot. So what do I use to get either the 'Type' and 'data-automationid.' so I can click the 'Log in' button? Here's the code, I have tried most IE #include <IE.au3> #include <MsgBoxConstants.au3> Call ("signIn") Func signIn () Global $oIE = _IECreate ("https://login.xero.com/identity/user/login?") Local $username = _IEGetObjByName ($oIE,"Username") Local $password = _IEGetObjByName ($oIE,"Password") Local $button = _IEGetObjByName ($oIE,"button") ;Local $button1 = _IEGetObjById ($oIE,"submitcodebutton") ;Local $button1 = _IEFormElementGetCollection ($oIE,"auth-submitcodebutton") ;Local $button1 = _IEFormElementGetObjByName ($oIE,"auth-submitcodebutton") _IEFormElementSetValue ($username,"techngo") _IEFormElementSetValue ($password,"password") _IEAction($button, "click") Sleep(20000) ;Complete logging in with the authenticator app MsgBox($MB_SYSTEMMODAL, "authenticator", "Enter the 6 digit from phone", 10) Sleep(2000) ;CLICK LOGIN BUTTON ;Local $button1 = _IEGetObjByName ($oIE,"auth-submitcodebutton") ;Local $button1 = _IEGetObjById ($oIE,"auth-submitcodebutton") ;Local $button1 = _IEGetObjById ($oIE,"data-automationid") ;Local $button1 = _IETagNameGetCollection ($oIE,"auth-submitcodebutton") Local $button1 = _IETagNameGetCollection ($oIE,"data-automationid") _IEAction($button1, "click") EndFunc Link to comment Share on other sites More sharing options...
Nine Posted June 24, 2020 Share Posted June 24, 2020 It works for me : #include <IE.au3> Global $oIE signIn() Func signIn() $oIE = _IECreate("https://login.xero.com/identity/user/login?") Local $username = _IEGetObjByName($oIE, "Username") Local $password = _IEGetObjByName($oIE, "Password") _IEFormElementSetValue($username, "techngo") _IEFormElementSetValue($password, "password") Local $button = _IETagNameGetCollection($oIE, "button", 0) ;Local $button = _IEGetObjByName($oIE, "button") ; that also work for me _IEAction($button, "click") _IELoadWait ($oIE) EndFunc ;==>signIn “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...
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