weevil

Cannot bypass cert errors

4 posts in this topic

Hi All,

I'm trying to create a script for an internal website process.  The website doesn't have any certificates so presents with the standard IE errors.  I am using the following to try and by pass:

Func IsCertificateErrorPage($IEObject)
 local $returnVal = False
 If StringRegExp(_IEBodyReadText ($IEObject), "There is a problem with this website.s security certificate.") Then
  $returnVal = True
 EndIf
 return $returnVal
EndFunc

 

and

 

Func ContinueOnCertificateError($IEObject)
 _IELinkClickByText ($IEObject, "Continue to this website (not recommended).",0,0)
EndFunc

After IE Opens:

 If (IsCertificateErrorPage($oIE), "Yes")==0) Then
  ContinueOnCertificateError($oIE)
  sleep(500)
     EndIf

It doesn't click the link!

 

any suggestions?

 

Thanks!

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Hi John,

 

Originally that said:

 

 

$BypassCertificateError an external variable that I removed whilst testing (it doesn't really need it.

 

Here's the entire code:

http://paste.ofcode.org/3aphTTb5Kgq9xSHJA6VPJz5

 

As you can see, I am bypassing the cert error at the moment the extremely dirty way:

 

WinWait("Certificate Error: Navigation Blocked - Windows Internet Explorer")
Send ("{TAB 10}")
 

But I'd much rather bring back the naive method of bypassing, either by clicking the link using the commented out line:

;_IELinkClickByText($oIE, "Continue to this website (not recommended).")
 

Also - I cant seem to paste code using the code snippet - does it only work line by line or something? :(

 

 

 

Edited by weevil
added

Share this post


Link to post
Share on other sites

weevil,

I do not think we are prepared to help you bypass the error given that it is placed there for a purpose. Thread locked.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.