I can use Culebra to touch the checkbox of Mobile data, make a checking True or False by calling checkbox_id.isChecked()
, everything is working fine. But I can't find the method isChecked()
in the script ViewClient.py
, where does this method come from ?
Asked
Active
Viewed 152 times
0
1 Answers
0
If you take a look at View.__getattr__()
, you'll see
if self.map.has_key(name):
...
elif name.startswith('is'):
# try removing 'is' prefix
if DEBUG_GETATTR:
print >> sys.stderr, " __getattr__: trying without 'is' prefix"
suffix = name[2:].lower()
if self.map.has_key(suffix):
r = self.map[suffix]
else:
# Default behavior
raise AttributeError, name
So, when you invoke isChecked()
on a View
instance, 'is' prefix is removed and the remaining string is converted to lowercase and then self.map
is checked to verify if it contains such key.

Diego Torres Milano
- 65,697
- 9
- 111
- 134
-
Thank you for your explanation, I didn't realize it was an attribute matter. – AbrtFus May 01 '15 at 04:13
-
it's done, and for the others questions you have answered too, sorry my bad, I have to learn how to use stackoverflow :) – AbrtFus May 02 '15 at 03:47
-
Thanks, this keeps the site well organized. – Diego Torres Milano May 02 '15 at 04:00