How to tick checkboxes with the same name?

malayrev at gmail.com malayrev at gmail.com
Thu Jul 25 11:46:05 EDT 2013


вторник, 23 июля 2013 г., 11:25:00 UTC+4 пользователь Peter Otten написал:
> malayrev at gmail.com wrote:
> 
> 
> 
> > I faced a problem: to implement appropriate search program I need to tick
> 
> > few checkboxes which turned out to have the same name (name="a",
> 
> > id="a1","a2","a3","a4"). Set_input('a', True) does not work (I use Grab
> 
> > library), 
> 
> 
> 
> For all but the most popular projects a url works wonders. I'm assuming 
> 
> 
> 
> http://grablib.org
> 
> 
> 
> > this command leads to the error "checkboxgroup must be set to a
> 
> > sequence". I don't understand what the sequence actually is, so I'm stuck
> 
> > with how to tick the checkboxes. 
> 
> 
> 
> If I were to guess:
> 
> 
> 
> set_input("a", [True, True, True, True])
> 
> 
> 
> but I don't see that form documented on page
> 
> 
> 
> http://docs.grablib.org/api/ext_form.html
> 
> 
> 
> If it doesn't work try
> 
> 
> 
> set_input_by_id(_"a1", True)
> 
> set_input_by_id(_"a2", True)
> 
> 
> 
> and so on.

Well, I have read the documentation, I guess the problem lies in somewhat different field. As long as I understand it refers to Checkboxgroup classes. As checkboxes of interest belong to some common group with the common name "a", they do have values different from "True" or "False" (probably a sequence?) and I should guess somehow what are the real ones. How to do this?



More information about the Python-list mailing list