Jump to content

Remove footer from loaded webpage


Jemboy
 Share

Recommended Posts

Hi,

At work we have some proprietary website, users have to login to.
I have "made" an autoit executable to start IE, go the website, login, so the user do not have input their credentials every time.
By NDA I am not allowed disclosed the URL of the website nor the login credentials;)

So I made a fake website and an autoitscript to illustrate my question.

#include <ie.au3>

$oIE = _IECreate ("about:blank", 0, 1, 1, 1)
$HWND = _IEPropertyGet($oIE, "hwnd")
WinActivate  ($HWND,"")
WinSetState($HWND, "", @SW_MAXIMIZE)

_IENavigate ($oIE, "http://demo.rkilinc.nl",1)

The above start my demo website. The actual website has some links in the footer that I do not want most people click on.
I contacted the developers of the website and they are thinking of making an option to configure what links to show in the footer, but they said it's not a high priority for them.

 

I discovered, that by click F12 and deleting the <footer> element the footer is delete from the live page view (until the page is reloaded off course)
I want to automate the removal of the footer, without using things like send().

I tried getting the footer with _IEGetObjById and deleting it with _IEAction, but that didn't work.

Does any one has an idea how I could delete the footer directly from view with an autoit script?

TIA, Jem.

 

 

2019-01-10 23_43_42-Boxus - Html Responsive One Page Template - Internet Explorer.png

Link to comment
Share on other sites

deleting with IEAction should be the way to do it, or maybe try setting invisible with IEAction.

sometimes if the final webpage was a redirect from what you put in IENavigate then you have to call IEAttach before you can change interact with it.

If @error Then
    MsgBox(262192, "", @ComputerName & " slaps " & @UserName & " around a bit with a large trout!")
EndIf

"Yeah yeah yeah patience, how long will that take?"  -Ed Gruberman

REAL search results  |  SciTE4AutoIt3 Editor Full Version

Link to comment
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
 Share

×
×
  • Create New...