Blackstar 0 Posted October 20, 2007 I am unable to log in this web page using _IELinkClickByText for LOG IN button. It is not "clicking" it. Is there a flaw in this code? #include <IE.au3> $oIE = _IECreate("https://my.t-mobile.com/login/MyTmobileLogin.aspx", 0, 1, 0) _IELoadWait($oIE) $oUsername = _IEGetObjByName($oIE, "Login1:txtMSISDN") $oPassword = _IEGetObjByName($oIE, "Login1:txtPassword") _IEFormElementSetValue($oUsername, "0123456789") _IEFormElementSetValue($oPassword, "password") _IELinkClickByText($oIE, "LOG IN") Share this post Link to post Share on other sites
Thatsgreat2345 0 Posted October 20, 2007 The word LOG IN is just text its not actually a link. Have you tried IEFormSubmit or IEImgClick or get an object IEAction using click Share this post Link to post Share on other sites
DaleHohm 65 Posted October 20, 2007 I am unable to log in this web page using _IELinkClickByText for LOG IN button. It is not "clicking" it. Is there a flaw in this code?This is because there is no "link" to click. It is using javascript technique (onclick event) to activate the login using a special HTML tag called a DIV. BTW, DebugBar made it very quick and easy to diagnose this (see my sig). Here is the important section of code: <DIV id=enabledbtnLoginClickOnce onmouseover="java script:window.status='LOG IN';" style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px" onclick="java script: { if (typeof(Page_ClientValidate) != 'function' || Page_ClientValidate()) __doPostBack('Login1$btnLoginClickOnce','') };{ if (Page_IsValid) PleaseWait('enabledbtnLoginClickOnce', 'disabledbtnLoginClickOnce', ''); }" onmouseout="window.status='';"><TABLE class=buttontable style="CURSOR: pointer; MARGIN-RIGHT: 15px" cellSpacing=0 cellPadding=0 border=0> <TBODY> <TR> <TD class=buttoncell><IMG src="/images/mytmobile/ph/buttons/leftp.gif" border=0></TD> <TD class=buttoncontainerp noWrap> <TD class=buttontextp style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: url(/images/mytmobile/ph/buttons/midp.gif) #fff repeat-x left top; PADDING-BOTTOM: 0px; PADDING-TOP: 0px">LOG IN</TD></TD> <TD class=buttoncell><IMG src="/images/mytmobile/ph/buttons/rightp.gif" border=0></TD></TR></TBODY></TABLE></DIV> Stody this and you'll see that a DIV with an ID of enabledbtnLoginClickOnce has an onclick action that initiates the login. So, replace your LinkClick with: $oDiv = _IEGetObjByID($oIE, "enabledbtnLoginClickOnce") _IEAction($oDiv, "click") Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curlMSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object modelAutomate input type=file (Related)Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better?IE.au3 issues with Vista - WorkaroundsSciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Share this post Link to post Share on other sites
Blackstar 0 Posted October 20, 2007 Ah got ya. Thanks. I like your DebugBar. Share this post Link to post Share on other sites