login connection problem using SimpleTest

Posted by Cedric on Stack Overflow See other posts from Stack Overflow or by Cedric
Published on 2010-05-12T11:49:01Z Indexed on 2010/05/12 11:54 UTC
Read the original article Hit count: 361

Filed under:
|
|
|

Hi everyone.

I am using SimpleBrowser from SimpleTest (http://www.simpletest.org) to login a webmin (http://www.webmin.com/). This login uses https. I've tried two different ways, both fail.

$browser = new SimpleBrowser();
$browser->useCookies();
$browser->useFrames();
//echoes the login page, where it should echo the landing page from a logged user
echo $browser->post('https://address/','user=User&pass=Secret'));

And also :

$browser = new SimpleBrowser();
$browser->useCookies();
$browser->useFrames();
$browser->get('https://address/');
$browser->setField('user', 'User');
$browser->setField('pass', 'Secret');
//echoes the login page, where it should echo the landing page from a logged user
echo $browser->clickSubmit('Login');

Do you have any clue why it doesn't work ?

© Stack Overflow or respective owner

Related posts about simpletest

Related posts about php