Development

#2961 (sfWebBrowserPlugin cant find form items with $ in there name.)

You must first sign up to be able to contribute.

Ticket #2961 (new defect)

Opened 10 months ago

Last modified 1 month ago

sfWebBrowserPlugin cant find form items with $ in there name.

Reported by: DerekAlmond Assigned to: Kris.Wallsmith
Priority: minor Milestone:
Component: sfWebBrowserPlugin Version: 1.0.11
Keywords: ULS sfWebBrowser Click Cc:
Qualification: Design decision

Description

To be honest, ive only ever noticed them on one site, and that just has to be the one i need to authenticate on ;-)(

to see the code - view the source of this URL, or run teh code below (probly best not to hammer that server though - its not mine)

$b = new sfWebBrowser(array(), 'sfCurlAdapter'); $b->get('http://ematrix.genusvs.co.uk/login.aspx'); $res = $b->getResponseText(); print $res;

...

<input type="submit" name="Login1$btnLogin" value="Login" id="Login1_btnLogin" class="input-button" />

...

to authenticate I'm using.

$b->get('http://ematrix.genusvs.co.uk/login.aspx')

->setField('Login1$UserName?', 'MYUSERNAME') ->setField('Login1$Password', 'MYPASSWORD') ->click('Login1$btnLogin');

I've also tried.

$b->get('http://ematrix.genusvs.co.uk/login.aspx')

->setField('Login1\$UserName?', 'MYUSERNAME') ->setField('Login1\$Password', 'MYPASSWORD') ->click('Login1\$btnLogin');

but cant find an escaping strategy that works

Change History

02/19/08 08:07:43 changed by FabianLange

  • priority changed from major to minor.
  • qualification changed from Unreviewed to Design decision.

where comes that "name" from? w3c spec says: ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").

and are you sure that the webbrowser does not expect the ID, rather the name?

Francois, do you want to patch this to allow illegal values for ID&name?

02/19/08 10:22:12 changed by DerekAlmond

where comes that "name" from?

I suspect its some kind of ASP.net auto generated field.

w3c spec says: ID and NAME tokens must begin with a letter ([A-Za-z]) and may be >>followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores >>("_"), >>colons (":"), and periods (".").

true, but you cant expect ASP developers to follow the standards ;-)

and are you sure that the webbrowser does not expect the ID, rather the name?

I've tried both, and have tried loading the page (http://ematrix.genusvs.co.uk/login.aspx') in lynx etc to check its not just a firefox bug.

10/31/08 19:34:42 changed by Kris.Wallsmith

  • owner changed from francois to Kris.Wallsmith.