问题
I'm trying to use Simpletest's scriptable browser to test out forms and links on an ASP site.
See this site:
http://www.acgme.org/adspublic/default.asp
If you click on the links (under the "search" section) in the left frame, the content in the right frame changes. If I direct link to the links on the left, I get an error.
Using simpletest:
<?php
require_once('../simpletest/browser.php');
$browser = &new SimpleBrowser();
$browser-> useCookies();
$browser-> useFrames();
$browser->get('http://www.acgme.org/adspublic/default.asp');
$browser->clickLink('Sponsoring Institutions');
$content = $browser->getContent();
echo $content;
?>
The "sponsoring institutions" page doesn't show but rather the error.
Any ideas? Or is there a different way to do this? I've Used Selenium for this, but I really need something server side that doesn't show the actual browser running (like selenium).
来源:https://stackoverflow.com/questions/6284003/simpletest-browser-php-on-an-asp-site-that-doesnt-allow-direct-linking