浏览代码

do not use page representation for user.should_see

Rodja Trappe 2 年之前
父节点
当前提交
5b9bd9640a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tests/user.py

+ 1 - 1
tests/user.py

@@ -43,7 +43,7 @@ class User():
                     raise RuntimeError('The NiceGUI server has stopped running')
 
     def should_see(self, text: str) -> None:
-        assert text in self.page(), f'Could not find "{text}" on:\n{self.page()}'
+        assert self.selenium.title == text or self.find(text).text == text
 
     def click(self, target_text: str) -> None:
         self.find(target_text).click()