First Case: I start the casper from url by casper.start(“http://gzly.miit.gov.cn:8080/datainfo/miit/nycpscpzzsmd.jsp”). Then I do click on the nextpage button by casper.thenClick("//img[@src='images/button-down.gif']"). In this case, everything works well and I successfully reach the nextpage.
Second Case: I firstly saved the webpage to file(wget “http://gzly.miit.gov.cn:8080/datainfo/miit/nycpscpzzsmd.jsp” –O testpage.html). Then I try to start the casper from local file by casper.start(“testpage.html”). But in this case, I find that I can’t do effective click on the nextpage button any more, it just stays at the firstpage, nothing has changed after click on the nextpage button.
So how can I start the casper from the static file and keep the nextpage button effective?