Wednesday 15 June 2011

html - How Parse website with frame with casperjs -


I want to parse the website to receive notifications.

The website's frames were, t loaded.

This is the source code of my default web page:

   & Lt; Link rel = "stylesheet" type = "text / css" href = "webstyles.css" /> & Lt; Link rel = "icon" type = "image / ico" href = "favicon.ico" /> & Lt; Link rel = "shortcut icon" type = "image / x-icon" href = "favicon.ico" /> & Lt; Script type = "text / javascript" src = "commun.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Var i, currCount = 0; Var tbl_imgs, preload_image, loaded; Tbl_imgs = New Array ("Checkbox Page", "Status 2 Page", "l_droite.png", "l_trouble.png", "buttons.png", "paradox.png", "fl.png"); Preload_image = new array (); Loaded = new array (); Function Load Images () {for (i = 0; i  & lt; / head & gt; & lt; frameset columns = "100%, 0" & gt; & lt; frame src = "waitaff.html" Name = "mainframe" frameborder = "0" scrolling = "auto" noises size = "noor size" /> gtc: src / frames = "waitlive.html" name = "liveframe" framebroom = "0" scrolling = " Auto "Norrisige =" Noise Size " /> & Lt; noframes & gt; & lt; body & gt; & lt; p & gt; Frameset so you can use this installation tool & lt supported.Please do not upgrade your browser; / p & Gt; & lt; / body & gt; & lt; / noframes & gt; & lt; / frameset & gt; & lt; / html & gt;  

For example, I want to get this status "Assigned" or "Armed":

This is the structure of the code with the frame:

On my script, I have this test: I

  // step 2 & gt; Switch to correct iframe + check load position casp. Button (function () (this.wait (10000, function) {casper.waitFor (function () {return.withFrame ('mainframe', function ()}} );}, Function () {this.withFrame ('mainframe', function () {this.echo (this.getHTML ()); this.capture ('capture4.png');  

The frame does not load and my checking does not work.

Can you help me? I want to retrieve some information, such as "disarm" on my web page.


No comments:

Post a Comment