例如关键字 OpenApplication 是怎么样和 C:\Python27\Lib\site-packages\AppiumLibrary\keywords_applicationmanagement.py 中的 def open_application(self, remote_url, alias=None, **kwargs):函数对应起来的。它们的大小写不一致,而且函数名在 open 和 application 之间有个下划线_,谢谢!
大小写不敏感,忽略空格下划线 http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#keyword-names
刷帖让大神看到
看懂框架的源码就明白了哈,纸上得来终觉浅,还是要自己去读代码
class KeywordRecommendationFinder(object):
def init(self, user_keywords, libraries, resources): self.user_keywords = user_keywords self.libraries = libraries self.resources = resources
def recommend_similar_keywords(self, name): """Return keyword names similar to name.""" candidates = self.get_candidates('.' in name) normalizer = lambda name: candidates.get(name, name).lower().replace( '', ' ') finder = RecommendationFinder(normalizer) return finder.find_recommendations(name, candidates)
name