FranciscoG Posted July 21, 2019 Share Posted July 21, 2019 Hi, I am now in the AutoIt world. I am working with IE doing some basic stuff. I have a login page, I enter the credentials using this: IENavigate($oIE, "http://thesite.com/Login/Login.aspx") Local $oForm = _IEFormGetObjByName($oIE, "Form1") Local $oUsuario = _IEFormElementGetObjByName($oForm, "txtUser") Local $oClave = _IEFormElementGetObjByName($oForm, "txtPassword") _IEFormElementSetValue($oUsuario, "myUser") _IEFormElementSetValue($oClave, "myPass") Send("{ENTER}") Up to here, everything works fine, but after that, the site redirects to a page that generates the content dynamically. And there if I want to check the current URL using this: ConsoleWrite(_IEPropertyGet($oIE,"locationurl")) The result is the previous URL, or if I want to access any DOM element it reads "NO MATCH", for example, I have this portion of HTML in the new page: <DIV id=divFilter style="POSITION: absolute; LEFT: 40px; TOP: 150px; VISIBILITY: visible"><SPAN tabIndex=31 id=Label5 class=lblBoldUpperXXS>Provider: </SPAN> <SELECT onchange="return RSExecute('CasesList.aspx', 'RScboProveedorChange');__doPostBack('cboProvider','')" tabIndex=32 id=cboProvider class=ComboBox language=javascript style="WIDTH: 125px; BACKGROUND-COLOR: #b8e0fe" name=cboProveedor> <OPTION selected value=""></OPTION> <OPTION value=4>BGH</OPTION> <OPTION value=3>Mach Sponsor</OPTION> <OPTION value=1>RTST</OPTION> <OPTION value=2>ST Sponsor</OPTION> <OPTION value=5>STBackup</OPTION></SELECT></DIV> And if I try to access that element with: Local $oDiv = _IEGetObjById($oIE, "divFilter") I receive " No Match" I assume that the object $IE is the one created in line 1, and I need to refresh it after login in. How can I do that? I tried to use IEAttach but I could not make it work. Link to comment Share on other sites More sharing options...
Subz Posted July 21, 2019 Share Posted July 21, 2019 _IEAttach is the way to go, try different $sMode and use @error and @extended for debugging. 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