本帖最后由 wozhuibenle 于 2014-02-26 20:09:08 编辑

解决方案 »

  1.   

    点击链接也就是发送请求而已,java和.Net应该就可以了,容易上手
      

  2.   

    用Java的测试工具:Selenium + JUnit 
    可以打开网页,点击网页上的链接。
    import org.junit.After;
    import org.junit.Before;
    import org.junit.Test;
    import org.openqa.selenium.By;
    import org.openqa.selenium.WebDriver;
    import org.openqa.selenium.WebElement;
    import org.openqa.selenium.firefox.FirefoxDriver;
    import org.openqa.selenium.safari.SafariDriver;
    import org.openqa.selenium.support.ui.ExpectedCondition;
    import org.openqa.selenium.support.ui.WebDriverWait;public class SeleniumTest {
        protected WebDriver driver;    @Before
        public void setUp() {
            driver = new SafariDriver();
        }    @After
        public void cleanUp() {
            // Close the browser
            driver.quit();
        }    @Test
        public void search() {
            // And now use this to visit Baidu
            driver.get("http://www.baidu.com");
            // Alternatively the same thing can be done like this
            // driver.navigate().to("http://www.google.com");        // Find the text input element by its id
            WebElement element = driver.findElement(By.id("kw"));        // Enter something to search for
            element.sendKeys("Cheese!");        // Check the title of the page
            System.out.println("Page title is: " + driver.getTitle());        // Now submit the form. WebDriver will find the form for us from the element
            // driver.findElement(By.id("su")).click();
            element.submit();        // Baidu's search is rendered dynamically with JavaScript.
            // Wait for the page to load, timeout after 20 seconds
            (new WebDriverWait(driver, 20)).until(new ExpectedCondition<Boolean>() {
                public Boolean apply(WebDriver driver) {
                    return driver.getTitle().toLowerCase().startsWith("cheese!");
                }
            });        // Should see: "Cheese!_百度搜索"
            System.out.println("Page title is: " + driver.getTitle());
        }
    }
      

  3.   

    用Selenium可以实现楼主需求,就是一个测试软件
      

  4.   

    public class SeleniumTest {
        protected WebDriver driver;
     
        @Before
        public void setUp() {
         System.setProperty("webdriver.ie.bin","C:\\Program Files\\Internet Explorer\\iexplore.exe");
         try{
         driver= new InternetExplorerDriver();
           // driver = new FirefoxDriver();
         }catch (Exception e) {
    e.printStackTrace();
    }
        }
     
        @After
        public void cleanUp() {
            // Close the browser
            driver.quit();
        }
     
        @Test
        public void search() {
         //DefaultSelenium selenium = new DefaultSelenium( "localhost" , 4444, "*firefox D:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe","http://www.baidu.com");
           driver.get("http://www.baidu.com");
            // Alternatively the same thing can be done like this
            // driver.navigate().to("http://www.google.com");
     
            // Find the text input element by its id
            WebElement element = driver.findElement(By.name("wd"));
        
            // Enter something to search for
            element.sendKeys("Cheese!");
     
            // Check the title of the page
           System.out.println("Page title is: " + driver.getTitle());
     
            // Now submit the form. WebDriver will find the form for us from the element
            driver.findElement(By.id("su1")).click();
            //element.submit();
     
            // Baidu's search is rendered dynamically with JavaScript.
            // Wait for the page to load, timeout after 20 seconds
            (new WebDriverWait(driver, 20)).until(new ExpectedCondition<Boolean>() {
                public Boolean apply(WebDriver driver) {
                    return driver.getTitle().toLowerCase().startsWith("cheese!");
                }
            });
     
            // Should see: "Cheese!_百度搜索"
            System.out.println("Page title is: " + driver.getTitle());
        }
    } 楼上的我试了下有问题!改了一下可以用
      

  5.   

    对对亲我就是这个意思,我具体应该看哪一部分内容呢,我会php,有点基础。我就想学专门的那一块哈哈,亲给点指点,我爱死你了谢谢哈