can I override/redefine "global" Javascript functions, like confirm() and alert()? -


I want to do some browser automation, and those pesky confirm / warning boxes are actual pain. Unfortunately, Disabling javascript from is not an option.

Well, I was thinking, can I just change the definition of those methods as seen by the JavaScript interpreter of my browser, originally nothing can do and the truth is returned Could? Note that I know about defining them directly in JavaScript code, e.g. Insert

  function alert (message) {back true; }  

But AFAIK is not a viable approach to this situation because when the browsers do automation, I have to work with other people's javascript. In addition, my program actually starts loading again, these websites have already been fully loaded after the page, so I can already automatically rewrite JavaScript and then load the page. I am OK, so I was wondering if I can modify "Permanently" instead of just modifying and implementing the alert / confirmation method in my browser instead. Like the DLL injection equal to and within the scope of windows apps To be done Try it


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -