Subject: [LON-CAPA-dev] udom and login

From: Scott Harrison <[email-masked]>
Date: Thu, 02 May 2002 13:25:36 -0400

Dear Anyone:

Focus group question.

I am assuming that the login page has changed....
which breaks the following test_login.pl code.

$method='GET';
$url = URI->new('http://'.$hostname.'/adm/login');
$request->url($url);
$response=$ua->request($request);
my $content=$response->content;
my $udom;
if ($content=~/value\=(\S+)\s+name\=udom/) {
    $udom=$1;
}

I'm 92% certain that this is why the weblayer test
(that worked well in the past) is failing.

Does this sound right to the rest of you?

Regards,
Scott

-- 
Scott Harrison -- Graduate Student
Microbiology and Molecular Genetics
Mich. State. Univ., East Lansing, MI
[email-masked], 517-353-0998

---

From: Guy Albertelli II <[email-masked]>
Date: Thu, 2 May 2002 13:33:35 -0400 (EDT)

Hi Scott,

> I am assuming that the login page has changed....

Yes it has.

> if ($content=~/value\=(\S+)\s+name\=udom/) {

if ($content=~/name\=udom\s+value\=(\S+)/) {

would work much better

-- 
[email-masked]        BM: n^20 t20 z20 qS 
Guy Albertelli -7-8-7-  O-
    I'd love to but my wife is a rampant elephant bigot.

---

From: Scott Harrison <[email-masked]>
Date: Fri, 03 May 2002 23:06:57 -0400

> if ($content=~/name\=udom\s+value\=(\S+)/) {

Dear Guy:

Thanks.

Based on login page source code, the solution is...

<input type=hidden name=udom value="">
versus
<input type="text" name="udom" size="10" value=msu />

so probably
if ($content=~/input type=\"text\" name=\"udom\".*value\=(\S+)/) {

Still a few more changes to regex the login page correctly
again it seems...

testing-the-testing Regards,
Scott

> _______________________________________________
> LON-CAPA-dev mailing list
> [email-masked]
> http://mail.lon-capa.org/mailman/listinfo/lon-capa-dev