in reply to WWW::Mechanize::FireFox - radios with the same name

It seems that radio boxes are not really supported. I suggest retrieving the element(s) by the ID and then ->clicking on them. Alternatively, use ->field() with the id instead of the name, as documented in $mech->field().

Replies are listed 'Best First'.
Re^2: WWW::Mechanize::FireFox - radios with the same name
by elols (Initiate) on Feb 06, 2012 at 12:34 UTC
    Could you tell me more about this getting element by ID? When I'm trying clicking this radio i got message that it's not a button :( . Corion help me! I see you got skill in it. Sorry for my English - I don't use translators and I'm from Poland .

      The documentation for ->field() in WWW::Mechanize::Firefox says:

      A selector prefixed with '#' must match the id attribute of the input. A selector prefixed with '.' matches the class attribute. A selector prefixed with '^' or with no prefix matches the name attribute.

      I'm not sure how to make this clearer, but maybe an example helps:

      $mech->field('#foo', 'bar'); # set value of element with id "foo" to " +bar"

      I don't think that radio boxes are well-supported with WWW::Mechanize::Firefox though, because I've never needed them.

      A reply falls below the community's threshold of quality. You may see it by logging in.