1

I would like to be able to know when arbitrary JavaScript successfully executes a command in a web browser. The medium doesn't matter, it could be a log, stack trace, event signal, it just has to be something that can be programmatically analyzed.

I've thought about this problem for some time now and I have not been able to come up with an adequate solution. I'm no expert with JavaScript though, so I'm wondering what ideas you have?

Since you'll probably be wondering why, it's just something I'm very interested in.

Any input is appreciated. Can you help me?

EDIT: I've investigated using something like Firebug to monitor JavaScript functions, however I wasn't able to determine if Firebug can be run programmatically on a simulated Web Browser (like a web-browser control in ASP.NET, which is what I'm currently using.) Does anyone know if it can?

2 Answers 2

2

You can use the profiler of Firebug.

Go to the console tab and click Profile. The profiler starts and all the javascript actions are "logged" till you click Profile again. Then you get the list of javascript functions that were executed in this interval.

A similar feature is available in most modern browsers' consoles.

Source: See/Log which javascript function is being executed by the browser

Sign up to request clarification or add additional context in comments.

3 Comments

Ah, yes I've actually checked out Firebug. However (and I apologize for not specifying this in the above,) I am currently using a simulated web browser in ASP.NET, since I need this process to be automated. Do you know if Firebug can be employed on a web-browser control for example? I didn't think it could when I checked it out.
Thanks for the Vote Up. I'm looking in to your exact problem. I'll update ASAP.
Unfortunately I don't think the console will help me here, since I need to hook into the JavaScript engine. Thanks for your help though, it is appreciated.
2

The firefox browser could be used in asp .net using the selenium web driver and it also provide the ability to access all details from a web page. see the document and download api code and integrate it in your project its very easy to integrate using its help. http://docs.seleniumhq.org/projects/webdriver/

2 Comments

Oh interesting. I'll check that out right now, thanks for the input
it might not do the actual task you are finding but will help you as its similar to curl.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.