這個用python + Selenium 就解決了。見代碼:

from selenium import webdriver
import time

class keepalive():
    def setUp(self):
        self.driver = webdriver.Firefox()
        self.driver.implicitly_wait(30)
        self.base_url = "歡迎頁麵的base url"
        self.verificationErrors = []
   
    def keep_alive(self):
        driver = self.driver
        driver.get(self.base_url + "歡迎頁麵地址其他部分")
        driver.find_element_by_name("Submit").click()
       
    def tearDown(self): # quit the browser
        self.driver.quit()       

if __name__ == "__main__":   
    test = keepalive()   
    while True:         # this is a endless loop
        test.setUp()
        test.keep_alive()  
        test.tearDown()
        time.sleep(3 * 3600) # wait for 3 hours

所有跟帖: 

請您先登陸,再發跟帖!