سؤال

I'm an analyst looking for the simplest method possible to capture the values for various output fields in a pretty basic web application (my employer's product). This is all beyond me but, fumbling through the debugger tab in firefox, it looks like it's built mainly with javascript. I'm also seeing some ajax, and j-query action. (I'll paste an example below) I was thinking a script could be used to capture these variables (probably one custom script for any page that has enough fields to justify taking the time to put together the script). -- Also, let me know if you think it would actually take less time to actually just go through dozens of these web app pages and try to record the info manually in an excel sheet. That's sort of my default option. This work does have a due date of Sunday afternoon, because the new code will be pushed in place of this that evening. -- But, if you know of a solution that would work well but would take longer to put together, it would definitely help me out somewhere down the line -- There are 25 instances of what I presume to be the most complicated page. (lots of nested hierarchical folders, with buttons to swtich, numerical values, and other junk) -- Maybe some kind of client-side scripting app? (would strongly prefer freeware of course).

هل كانت مفيدة؟

المحلول

If all the outputs in the web application are of the same type or class, you can easily use a script in the Firefox debugger (I will hope you are using Firebug).

There's a tab called console, there you can call jquery and list the results for the output fields.

If everything is in an h2 tag it would be this:

for(var i = 0; i < $('h2').length; i++) {
    console.log($('h2')[i].innerHTML);
}

There are several other methods. Personally I find the Chrome console easier to use.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top