[Nottingham] How to capture text from a Javascript generated web browser panel display?

Jason Irwin jasonirwin73 at gmail.com
Tue Feb 17 08:50:17 UTC 2015


On 16/02/15 21:10, Martin wrote:
> I can follow the structure but if there is text in there somewhere, it
> is deep down folded out of sight.
> Interesting to see how a multi-paned web page can be so fabulously
> convoluted!
It'll be some bit of JS (usually minimised and unreadable) loading text
into an element (usually a <DIV> or <SPAN>) identified by id, or
relationship to some element with a target id.

This allows the JS to run asynchronously and only pull the bits of data
that are needed (e.g. the first 100 rows of a 40,000 row result set);
not refetch the entire page or heaving gobs of data that take ages to
download. It actually works really well when done properly, which would
include an export ticket/results/document(s) type function.

No matter what technology you choose, if the page is doing partial
refreshes then basic "wget http://foo/bar/" won't usually cut it
(although a well designed system will "wget
http://foo/bar/ticket/1234?forPrint=1"). These sites are designed for
humans, not machines. Specifically they're designed for marketeers who
value "shiny" over practical functionality such as export functions or
documented REST/WebServive APIs.

The trick, as you have found, is to target the correct element and as
Paul says, if it's on the screen it *will* be in Firebug's DOM model
(not sure about the default one, not really used it).

If your laptop will has access, we can take a look on Thurs.

-- 
╔═════════════╦══════════════════════════════════════════╗
║ Jason Irwin ║ OpenPGP (GPG/PGP) Public Key: 0xD0C592B1 ║
║             ║ Import from hkp://pgp.mit.edu            ║
╚═════════════╩══════════════════════════════════════════╝



More information about the Nottingham mailing list