def close(self, pata):
#carousel = self.find(MobileBy.ID, 'dialog_close_iv').click()
with open(pata) as f:
steps: list[dict]=yaml.safe_load(f)
element:WebElement= None
for step in steps:
logging.info(step)
if "MobileBy" in step.keys():
element=self.find(step["MobileBy"],step["loct"]) #这一行代码提示 错误 Expected type 'WebElement', got 'None' instead
打印下step,看下里面有没有值
已解决了,谢谢