Save webpage displayed in webbrowser control - windows

It is possible to save the content displayed on a webbrowser control in a Windows application, giving that there's no access to the source code? The webpage is downloaded in a proprietary format from a HTTP server, so sniffing the HTTP traffic doesn't help too much (it's a base64-encoded data which decoded gives a binary file without any recogniseable headers).
I think a good solution will be to load the application in Wine, giving the open-source nature of it, and trying to extract the data somehow from the Gecko HTML viewer, but I don't have any idea how to start...
Any better solutions than recompiling Wine to display the content of displaying webpages? I hope for some magic tool to display HTML source from a webbrowser control, but any starting point will be appreciated.
Thank you.

Ok, I successfully did this with AutoIt, with just three lines of code. Just attach to the IE Control and call IEPropertyGet on it. Sample code:
#include <IE.au3>
$oIE = _IEAttach("window_title", "embedded");
ConsoleWrite(_IEPropertyGet($oIE, "outerhtml"));
Now in AutoIt's console will appear the source code of the displayed page in embedded webbrowser control.

Related

How to add image in OBIEE?

I am coding some basic html code just to display an image banner to our OBIEE dashboard but failed to do so. I am a newbie in terms of programming so feel free to correct me in anyway. So, here's the detail.
I am currently working in the static text layout where the old banner was coded, I remove them and replace with a basic code that only import an image see here.
*Oracle Business Intelligence 12.2.1.4.0
I have tried coding it thru HTML,CSS, & Javascript those only the few I basically know. I did my research and follow some tutorials but no glimpse of hope to it, it does work when I relay the output in a browser while coding it in Visual Studio.
What I want is just to display it successfully and not to show a image icon. Hope someone can help me out. Thank You :)
I am struggling to comprehend where Visual Studio comes into this but assuming you want to just have an image on a dashboard then there are lots of options
It looks like you are trying to insert a remote image which is going to cause all sorts of security issues that are likely to mean it will get blocked.
The simplest is to just add a "link or Image" object and use a local image. If you click on the select image button there is an option to upload image and select it for display.
If you want to use html then you just need to add a text object and add the img html
<img src="https://someurl.com/img.jpg" />
but you are going to need to change lot of security policies to allow the content to be displayed.
There are other options to host the file locally such as a shared folder (https://gianniceresa.com/2017/02/obiee-12c-custom-style-using-shared-folder/) but the upload is far simpler.
If you insist of using a remote image you will need to understand security policies (CSP, XSS etc.) which aren't OBIEE specific but standard web server

Microsoft Web Matrix

Pretty easy question I hope: does anyone know of a tool that will effectively scrape sites built with Microsoft Matrix? I could write the code in python, but it will take me way longer than I think I want to dedicate to the task, namely because of the really bad and ugly HTML generated by Matrix.
I have tried Web Harvey, Helium Scraper, and I tried the Web Scraper plugin for Chrome. WebHarvey choked on the HTML and couldn't load subsequent pages. Helium Scraper was able to move from one details page to another (the Next links were followed) but content from within the details pages was not lifted out. The Chrome plugin web scraper was not able to navigate links, with the popup window displaying an error page. My gut is telling me that this has to do with uniquely ASP.net things, but I could be wrong.
Any pointers or suggestions appreciated.
You know there are two completely different versions of Microsoft Web Matrix right? There's the one from 2003; i have no idea what its html looks like. There's the one from 2011 to current which uses razor cshtml source files to produce its html. In the 2011+ one, you write the html by hand; there's no drag and drop, and so it's unlikely you'll get consistent html from site to site.

Checkbox on PDF template in Firefox

We have pdf templates that get data from a data source and write out a file with data in respective fields. It uses PeopleSoft delivered functionality to perform this action. What is interesting is, we open the PDF file in Chrome, Safari, IE and other browsers, a check appears (shown below) in the checkboxes. But when we open the same file, from the same run in a Firefox browser window, they appear as 4s (image below) instead of a check in the checkbox.
Does anyone have an idea if this is a known issue? Any help is appreciated.

View or Open in Browser vs. Download

I am using HTML and CSS, and willing to use a very simple JavaScript code if necessary.
I uploaded ResumeWord.doc and ResumePDF.pdf to the FTP. I created links for "View" "Download" and "Print" for each. ResumeWord.doc only seems to give me a pop-up with options to Open or Save instead of opening in the browser, while I was able to open ResumePDF.pdf in the browser but not create a clickable link to download it without viewing. I have tried the HTML target_blank and JavaScript window.open for the "View", unsuccessfully. I am self-taught and an amatuer.
How can I make the "View" link open ResumeWord.pdf in the browser without a pop-up?
How can I get ResumePDF.pdf to download when the user clicks "Download"?
Without some help, the browser won't assume that a user has Microsoft Word installed on their computer. That is why you only get the option to save it, rather than it opening.
The PDF, however, is something that can be viewed in-browser, and the browser can check if the right files are installed to make this happen. So if they are, the browser goes ahead and opens the file.
As for forcing the browser to open a word file, see this SO question.
And as for forcing a download of a PDF, see this SO question. It may not be possible, in your case, as the solution involves sending different server-side headers.

Firefox Live DOM

Is it possible through a plugin or setting or something to allow Firefox to recognize the live DOM source code?
Basically, firebug or other similar tools can recognize elements on the page which Firefox does not.
I understand with these extensions I have the ability to see such changes made by javascript, but Firefox does not seem to fully recognize them.
I'll try to clarify.
If I load a page and view source (ctrl-U), I see what the server sent to Firefox, and what Firefox ostensibly recognizes as the source code of the page. If in that source code, there is javascript which alters the DOM, and then I hit (ctrl-U) again, the code is not updated.
I am using a testing tool (iMacros firefox plugin) to automate functionality, but it does not recognize the updated DOM because Firefox does not. Firebug and similar tools can recognize these "live" updates. Does that help?
http://www.chapter31.com/2006/12/04/viewing-ajax-generated-source-code/
You can try using the web-developer extension with a view-generated-source option.
I'm still not sure I understand your question, but I think what you're getting at is the Web Developer extension for FireFox, specifically its "View Generated Source" feature.
That will let you see the altered DOM.
Firebug gives u this ability:
for instance check the HTML tab when running a jquery ticker and see the dynamic changes live in the DOM
Usually, when I have weird issues with either the console or the DOM inspector with firebug, I find restarting the browser and validating your code is the way forward.
That said, I'm not really following your question, the document that firebug shows is the same one in the firefox window...?
It looks like the problem is not that you want firefox to show the current DOM when you hit CTRL+U, but that you want some automated testing tool to be able to test your web pages.
Perhaps you should use a testing tool that is suited to the job of testing rich web applications, Selenium, for example, can do this.

Resources