Sign in to follow this  
Followers 0
chandana

I am not able to login into website using firefox?

7 posts in this topic

#1 ·  Posted (edited)

Hi i have tried this following script it is working for all other sites. but this not working for following site?

#include <FF.au3>#include <_FF_AutoLogin.au3>Dim $url, 
$url ="https://10.198.12.51/" 
$formID = ""
$formUID = "usernameInput"
$uName = "srv.iloadmin"
$formPID = "passwordInput"
$pwd = "SeR^ER@iL0"
$formSubmit = "ID_LOGON"
Run(@ProgramFilesDir & "\Mozilla Firefox\firefox.exe " , "", @SW_MAXIMIZE)
If _FFConnect () Then
  ;_FF_AutoLogin($uName,$pwd,$url)  
_FFSetValue($uName,$formUID,"id")
 _FFSetValue($pwd,$formPID,"id")
EndIf
_FFClick($formSubmit,"id")
i am getting following error.

>"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut 
"C:\Users\m1024071\Desktop\FF-mozilla\Gmail1.au3"   __FFSend 
==> Socket Error_FFCmd ==> Error return value__FFSend ==> 
Socket Error_FFCmd ==> Error return value_FFClick ==> No match: 
$sElement: FFau3.xpath_FFConnect: OS: WIN_8 WIN32_NT 
9200_FFConnect: AutoIt: 3.3.10.2_FFConnect: 
FF.au3: 0.6.0.1b-10_FFConnect: IP: 127.0.0.1_FFConnect: 
Port: 4242_FFConnect: Delay:  2ms_FFConnect: Socket: 
 692_FFConnect: Browser: Mozilla/5.0 (Windows NT 6.2; WOW64; 
rv:29.0) Gecko/20100101 Firefox/29.0__FFSendJavaScripts: Sending functions 
to FireFox .......... done_FFOpenURL: https://10.198.12.51/__FFSend: 
try{window.content.top.document.location.href='https://10.198.12.51/'}catch(e){'_FFCmd_Err';};__FFRecv: 
https://10.198.12.51/_FFLoadWait: 
.......................................__FFWaitForRepl ==> Error TCPSend 
/ TCPRecv: TCPRecv :-1. loaded in 10735ms[object XrayWrapper [object 
HTMLDocument]] - {location: {...}, getElementsByName: function() {...}, 
getItems: function() {...}, open: function() {...}, close: function() {...}, 
write: function() {...}, writeln: function() {...}, ...}__FFSend: 
FFau3.WCD=window.content.top.document;__FFRecv: [object XrayWrapper [object 
HTMLDocument]] - {location: {...}, getElementsByName: function() {...}, 
getItems: function() {...}, open: function() {...}, close: function() {...}, 
write: function() {...}, writeln: function() {...}, ...}[object XrayWrapper 
[object HTMLDocument]] - {location: {...}, getElementsByName: function() {...}, 
getItems: function() {...}, open: function() {...}, close: function() {...}, 
write: function() {...}, writeln: function() {...}, ...}__FFSend: 
try{window.content.top.document.forms.length}catch(e){'_FFCmd_Err';};__FFRecv: 
0__FFSend: 
FFau3.xpath=null;try{FFau3.xpath=FFau3.WCD.evaluate("count(//form[1]//input[@type='password'])",FFau3.WCD,null,XPathResult.NUMBER_TYPE,null).numberValue;}catch(e){'_FFXPath_Error: 
'+e;};__FFRecv: 0__FFSend: 
try{window.content.top.document.getElementById('usernameInput').value='srv.iloadmin'}catch(e){'_FFCmd_Err';};__FFRecv: 
_FFCmd_Err_FFSetValue ==> No match: $sElement: 
.getElementById('usernameInput')__FFSend: 
try{window.content.top.document.getElementById('passwordInput').value='SeR^ER@iL0'}catch(e){'_FFCmd_Err';};__FFRecv: 
_FFCmd_Err_FFSetValue ==> No match: $sElement: 
.getElementById('passwordInput')__FFSend: 
try{FFau3.simulateEvent(FFau3.WCD.getElementById('ID_LOGON'),'MouseEvents','click');}catch(e){'_FFCmd_Err';};__FFRecv: 
-3_FFClick ==> No match: $sElement: 
FFau3.WCD.getElementById('ID_LOGON')>Exit code: 0    Time: 
14.347
but i have tag id as same in html:

<tbody><tr>   <td colspan="2" 
height="30px"></td>
  </tr><tr>   <td 
colspan="2">    <div id="ID_SECJMP" 
style="display: none;"></div></td>
  </tr><tr>   <td 
class="login_fields_lable" style="width: 
34%;">    <span id="usernameBox" 
style="white-space: nowrap; vertical-align: middle;" 
rel="localize[login.LocalUserName]">Local&nbsp;user&nbsp;name:</span>   </td>
   <td 
class="login_fields">    <input autocomplete="off" 
class="textfield" name="usernameInput" id="usernameInput" size="30" 
onkeypress="return checkEnter(event);" 
type="text">   </td>
  </tr><tr>   <td 
class="login_fields_lable" style="width: 
34%;">    <span id="passwordBox" 
style="vertical-align: middle;" 
rel="localize[login.password]">Password:</span>   </td>
   <td 
class="login_fields">    <input autocomplete="off" 
class="textfield" name="passwordInput" id="passwordInput" size="30" 
onkeypress="return checkEnter(event);" 
type="password">   </td>
  </tr><tr id="lang_row" 
style="display:none;">   <td class="login_fields_lable" 
style="width: 34%;">    <span id="languageBox" 
style="vertical-align: middle;" 
rel="localize[navigation.lang]">Language</span>   </td>
   <td 
class="login_fields">    <select 
name="lang_options" id="lang_options" 
onchange="changeLanguage();">      <option 
value="en">English</option>     </select>   </td>
  </tr><tr id="remember_section" 
style="display:none;">   <td 
style="text-align:right;">    <br>    <span 
class="remember_cb">     <input 
id="remember_checkbox" name="remember_checkbox" value="checkboxValue" 
type="checkbox">    </span></td>
   <td>    <br>    <span 
id="rememberBox" rel="localize[login.remember]" style="white-space: 
nowrap;">Remember my login information on this 
browser.</span>   </td>
  </tr><tr>   <td>&nbsp;</td>
   <td>    <br>    <button 
id="ID_LOGON" name="ID_LOGON" type="button" onclick="signIn(); return false;" 
rel="localize[login.loginButton]">Log&nbsp;In</button>    <!--<button 
id="lang_button" onclick="javascript:showLang()" style="display:none;width: 
25px; max-width: 25px; min-width: 
25px;">EN</button>-->   </td>
  </tr><tr><td></td><td 
id="ID_SPNEGO_FRAME" style="display: none">   <button 
tabindex="5" id="ID_SPNEGO" name="ID_SPNEGO" 
onclick="javascript:signInSpnego();return false;" 
rel="localize[login.zeroSignIn]">HP Zero Sign 
In</button>  </td></tr><tr><td 
colspan="2" id="messageSection">   <!-- Highlight / 
Error -->   <div id="ID_LOGIN_FAILED_CUSTOM" 
style="display: none;"></div><div id="ID_LOGIN_DELAY" 
style="display: none;"></div><div id="VALIDATION_ERROR" 
style="display: none;"></div><div id="ID_LOGOUT_REASON" 
style="display: 
none;"></div></td></tr></tbody>
Edited by chandana

Share this post


Link to post
Share on other sites



Use AutoIt tags in stead of Plain Text tags please, it will make it easier for everyone else to read your code and help you.

Share this post


Link to post
Share on other sites

Isn't this a duplicate of >this thread where I explained why _FF_AutoLogin won't work on this web page?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Isn't this a duplicate of >this thread where I explained why _FF_AutoLogin won't work on this web page?

no this is different.That issue is resolved actually there came to know my mistake as soon as posted . there mistake is with me .but here this code is not developed with form tag in html(but this will work in windows 7).now i  want to upgrade this to windows 8

Edited by chandana

Share this post


Link to post
Share on other sites

Sorry... but it appears to be the exact same issue to me. There is no form on the HTML page. Therefore, the call to _FF_AutoLogin will always fail.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Sorry... but it appears to be the exact same issue to me. There is no form on the HTML page. Therefore, the call to _FF_AutoLogin will always fail.

ok if it fail with this case fine. but i am using

_FFSetValue($uName,$formUID,"id")

_FFSetValue($pwd,$formPID,"id")

also ..why this is also failing. is there any other way to fill form without form tag in html

Edited by chandana

Share this post


Link to post
Share on other sites

Ok... so the called to _FF_AutoLogin was a ruse. Next time post the minimal code to demonstrate the issue so as not to confuse the person trying to assist you.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0