def __init__(self):
self.object_name = 'UIAutoProject'
def get_root_path(self):
cur_path = os.getcwd()
return cur_path[:cur_path.find(self.object_name) + len(self.object_name)] + '\\'
注:该方法是通过字符串切片去找的
def __init__(self):
self.object_name = 'UIAutoProject'
def get_root_path(self):
cur_path = os.getcwd()
return cur_path[:cur_path.find(self.object_name) + len(self.object_name)] + '\\'
注:该方法是通过字符串切片去找的