0

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 ?

Paritosh
  • 2,097
  • 3
  • 30
  • 42
AbrtFus
  • 29
  • 7

1 Answers1

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