Jump to content
Sign in to follow this  
twillster

Webpage status check

Recommended Posts

Hey all, i'm trying to use the IE udf to determine the status of my online banking.  Basically I'm trying to bring up the login page and use that as part of my check.

I'm using beta 3.3.9 with the newest IE udf from 3/13.

So this is the code I have.... (very small at this point and time)

#include <ie.au3>

$URL = "https://secure.ambankiowa.com/pbi_pbi1961/pbi1961.ashx?Rt=073917641&LogonBy=Connect3&PRMAccess=Portfolio"

Local $oIE = _IECreate($URL)
MsgBox(1,"Error",@EXTENDED)

Exit

The problem is, _IELoadWait never returns.  It eventually times out.  Now, I read something about it possibly being XML related, but I'm not quite sure.

Any ideas would be appreciated.

Share this post


Link to post
Share on other sites

Hey,

This is working for me on IE9 and latest official release of autoit.

#include <ie.au3>

$URL = "https://secure.ambankiowa.com/pbi_pbi1961/pbi1961.ashx?Rt=073917641&LogonBy=Connect3&PRMAccess=Portfolio"

Local $oIE = _IECreate($URL, -1, -1, 1)
if $oIE <> 0 then 
 msgbox(1,"Info", "Page loaded successfully!")
else
 msgbox(1,"Info", "Error loading webpage. Error code "& @error)
endif

Does it work for you as well?

Edited by Neutro

Share this post


Link to post
Share on other sites

Huh... I have IE9 too. Now, I should say too that I am on a 64 bit version of Win 7, but running the 32 bit version of AutoIT.

When I run the script I get this warning:
--> IE.au3 T3.0-0 Warning from function _IEAttach, $_IEStatus_NoMatch

but it just sits and does nothing.

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /beta /ErrorStdOut /in "U:\My Documents\Projects\autoit\Online Banking Verification\test.au3" /UserParams    
+>07:54:43 Starting AutoIt3Wrapper v.2.1.0.8    Environment(Language:0409  Keyboard:00000409  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64)
>Running AU3Check (3.3.9.4)  from:C:\Program Files (x86)\AutoIt3\beta
+>07:54:44 AU3Check ended.rc:0
>Running:(3.3.9.4):C:\Program Files (x86)\AutoIt3\beta\autoit3.exe "U:\My Documents\Projects\autoit\Online Banking Verification\test.au3"    
--> IE.au3 T3.0-0 Warning from function _IEAttach, $_IEStatus_NoMatch

 
Just don't know why it's returning $_IEStatus_NoMatch

Share this post


Link to post
Share on other sites

I ran the code in your basenote without trouble on

1) Windows 7, 32bit, IE 10, AutoIt 3.3.9.4 and the T3.0-0 version of IE.au3

2) Windows 7, 64bit, IE 8, AutoIt 3.3.9.4 and the T3.0-0 version of IE.au3

(it ran and returned quickly).

I don't have the specific config you have and I can't guess what your trouble might be.  Perhaps an intermittent problem with the website?

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe 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

I tend to use this for checking the status of webpages as it can get you the status text and status code (eg, 404 not found, 401 Not authorised, etc)

ConsoleWrite("Checking Bank: " & _GetURLStatus("https://secure.ambankiowa.com/pbi_pbi1961/pbi1961.ashx?Rt=073917641&LogonBy=Connect3&PRMAccess=Portfolio") & :@CRLF)
 
Func _GetURLStatus($inURL)
 
   Local $val = ""
 
   Local $objHTTP = ObjCreate("MSXML2.ServerXMLHTTP.6.0")
   $objHTTP.Open("GET", $inURL, false)
 
   ; Uncomment next 4 lines if using a proxy server
   ;Local $proxyserver  = "" ; add proxy server name
   ;Local $proxyport  = "" ; add proxy server port
   ;Local $ProxyExceptions = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyOverride") ; get any proxy exceptions
   ;$objHTTP.setProxy("2", $proxyserver & ":" & $proxyport, $ProxyExceptions)
  
   $objHTTP.Send(" ")
 
   ; Check the status code of the request
   If $objHTTP.status = "200" Then
    $val = $objHTTP.statusText
   Else
    $val = $objHTTP.statustext & " (" & $objHTTP.status & ")"
   EndIf
 
   Return $val
 
EndFunc
 
 

NiVZ

Edited by NiVZ

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  

  • Similar Content

    • By VinMe
      Dear all, i am unable to open a xml file to excel in the "xml table format" Please help me out in where i am missing
      Local $strFileToOpen = _WinAPI_OpenFileDlg('Select xml file', @WorkingDir, 'All Files(*.*)', 1, '', '', BitOR($OFN_PATHMUSTEXIST, $OFN_FILEMUSTEXIST, $OFN_HIDEREADONLY)) Global $xlXmlLoadImportToList = 2 ; Places the contents of the XML data file in an XML table $oExcel = _Excel_Open() $oWorkbook1=$oExcel.Workbooks.OpenXML($strFileToOpen, "", $xlXmlLoadImportToList) If $strFileToOpen <> False Then     Local $oWorkbook1 = _Excel_BookOpen($oExcel, $strFileToOpen) EndIf Error i am getting is:
      ......\81e_Compare_v1.au3" (46) : ==> The requested action with this object has failed.:
      $oWorkbook1=$oExcel.Workbooks.OpenXML($strFileToOpen, "", $xlXmlLoadImportToList)
      $oWorkbook1=$oExcel.Workbooks^ ERROR
      >Exit code: 1    Time: 7.338
    • By Seminko
      Hey there,
      below function returns an "object collection" (not sure if that's the correct term) of 'a' elements grabbed from within //*[@id="J_DetailMeta"].
      However, I need the returned collection not to include objects with 'aria-disabled = true'. Is there a way of removing specific objects from such a collection?
      Func GetObjectList($sPicker) $oDetailMeta = _IEGetObjById($oIE, "J_DetailMeta") If Not @error Then $tags = $oDetailMeta.GetElementsByTagName("ul") For $tag in $tags $data_ID_value = $tag.GetAttribute("data-property") If $sPicker = "color" Then If $data_ID_value = '????' Or $data_ID_value = "????" Then $oReturnList = $tag.GetElementsByTagName("a") EndIf ElseIf $sPicker = "network" Then If $data_ID_value = '????' Then $oReturnList = $tag.GetElementsByTagName("a") EndIf ElseIf $sPicker = "storage" Then If $data_ID_value = '????' Then $oReturnList = $tag.GetElementsByTagName("a") EndIf EndIf Next EndIf Return $oReturnList EndFunc $oColorList = GetObjectList("color") For $oColor In $oColorList If StringInStr($oColor.GetAttribute("aria-disabled"), "true") <= 0 Then ; remove object from the collection ??? EndIf Next  
    • By ijourneaux
      I have been using the XML UDF successfully for sometime. I am now tring to add in error handling for some bad XML files I run into.
      $oXmlDoc = _XML_CreateDOMDocument(Default) _XML_Load($oXmlDoc,$sFileXML) ;<== ENTER XML FILE PATH HERE If @error Then ; ConsoleWrite(StringFormat("_XML_load error - @error = %s", @error) & @CRLF) ; ConsoleWrite("-" & $sFileXML & @CRLF) Exit -1 EndIf ConsoleWrite("-" & $sFileXML & @CRLF) ;If no specified nodes exist, log error and exit If Not _XML_NodeExists($oXmlDoc, "//Property") Then ; ConsoleWrite("No specified nodes exist" & @CRLF) Exit -1 EndIf ;Get number of Property nodes $oProperties = _XML_SelectNodes($oXmlDoc,"//Property/Data") $iNodeCount = @extended $oParents = $oXmlDoc.SelectSingleNode("//Property[@Name='Parents']/Data") There are no error upto this point. The XML file I am trying to handle has a Data node but when I try to
      $sParam = StringSplit($oParents.text, ";") I get a fatal error (requested action on object failed). How can I test for the problem before I try to do the string split? I tried using @error, and testing $oParents but no luck.
      Appreciate any tips.
    • By careca
      Hi, i feel im close to getting it to work, but there must be something im missing that's probably easy for you experts.
      #include <IE.au3> #include <File.au3> #include <MsgBoxConstants.au3> $Visible = 1 Local $oIE $oIE = _IECreate("https://beemp3s.net/mp3-download.html", 0, $Visible, 1, 1) _IELoadWait($oIE) If $oIE <> @error Then ;_ArrayText() _QuerySite('Finding Hope - Without You') ;_IEQuit($oIE) ;Exit Else MsgBox(64 + 262144, 'Fail', 'Could not create a new window') EndIf ;============================================================================= Func _QuerySite($Name) Local $oIE_ObjectToSearch = _IEGetObjById($oIE, 'query') _IEDocInsertText($oIE_ObjectToSearch, $Name) Local $oIE_ObjectToClick = _IEGetObjById($oIE, "search-action") _IEAction($oIE_ObjectToClick, 'click') _IELoadWait($oIE, 2000) ;============================================================================= Local $oSubmitClick = _IEGetObjById($oIE, "col-md-12") _IEAction($oSubmitClick, "click") _IELoadWait($oIE, 2000) ;============================================================================= Local $oBtns = _IETagNameGetCollection($oIE, "div") For $oBtn In $oBtns If String($oBtn.classname) = "col-md-12" Then If String($oBtn.innertext) = "Download / Play" Then ConsoleWrite($oBtn.innertext & @CRLF) _IEAction($oBtn, 'click') EndIf EndIf Next ;============================================================================= ;Local $oElements = _IETagNameAllGetCollection($oIE) ;For $oElement In $oElements ; If $oElement.id Then MsgBox($MB_SYSTEMMODAL, "Element Info", "Tagname: " & $oElement.tagname & @CRLF & "id: " & $oElement.id & @CRLF & "innerText: " & $oElement.innerText) ;Next ;============================================================================= ;_IEQuit($oIE) ;Exit ;============================================================================= EndFunc ;==>_QuerySite ;============================================================================= Func _ArrayText() If FileExists('Titles.txt') Then Local $FO = FileOpen('Titles.txt') Local $R2A = FileReadToArray($FO) Local $iLineCount = @extended FileClose($FO) For $f = 0 To $iLineCount - 1 ConsoleWrite($f & ' - ' & $R2A[$f] & @CRLF) _QuerySite($R2A[$f]) Next Else MsgBox(64 + 262144, 'Fail', 'Could not find the file Titles.txt') EndIf EndFunc ;==>_ArrayText ;============================================================================= The idea is to get into this site, write into the search and click, which i did, but now the problem is clicking in any of the buttons in the results page, im looking for a way to click the first one, it always matches to what i want, so no need to fiddle around.
      Site
      Thanks for help in advance.

    • By yoschga
      is there a possibility to let ie.au3 click into a form? i use on a project where i need to click into a form where items are loaded just writing it in or fill the form is no option
       

×
×
  • Create New...