简体   繁体   中英

How to get correct page on site that doesn't change URL

I need to go around a site using java programmatically but the site doesn't change the url when linked is clicked.

Site: http://cliqa.nana10.co.il/

On the right you have a bar with some links, click them and you will see that while the content changes the url doesn't change. how can i achieve programmatically this mouse click on one of the links in Java, I thought about HTTP POST but what exactly I'm going to send? an example would be much appreciated.

These links use JavaScript to trigger an AJAX request and refresh only the center of the page. Use FireBug inside Firefox to sniff the network requests and see which requests are executed on each click. Or use a programmatic web browser like HtmlUnit which will handle JavaScript as your web browser does.

You need to look at the actual HTTP request being sent. You can do this Chrome with the built in Inspect Element tool or Firebug in Firefox (or Live HTTP Headers). I prefer to use Burp Suite 's intercepting proxy to see this.

You can try charles (http://www.charlesproxy.com/). Check the section on JAVA APPLICATION PROXY CONFIGURATION at http://www.charlesproxy.com/documentation/configuration/browser-and-system-configuration/ . You can inspect and change request sent from your java application.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM