Hello is it possible for a java script to first click a link which will in my case open a pop up and after that it automatically clicks a b开发者_如何学Goutton on that pop up and then redirects the user to final page when a given code is copied and pasted into the address bar of the browser?
Only if all the pages had the same origin server. So if the initial page came from server.domain.tld you could inject code into that which opened the popup (which opens a page requested from server.domain.tld) - you code can wait until the popup is loaded and interact with it.
If any of the pages come from a different server then you become blocked from interacting with them because of the same origin policy followed by the javascript engine. The only way to operate outside of this is to run as part of the browser, i.e. to be part of a plugin (a bookmarklet (either as a bookmark or copied+pasted into the address bar) does not count in this regard).
精彩评论