code: def to_selector(self):
          
  
          for i in self.SELECTORS:
              if hasattr(self, i):
                  val = getattr(self, i)
                  selector = i
                  break
  
          return {selector: val}
docs: For some reason, the selector for <identity> is
  
              <identity id="1234" />
  
          rather than
  
              <identity by="id"></identity>