Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们如何在 sahi 脚本中应用断言来检查密码字段是否显示掩码值?例如,**********
**********
从输入中获取类型属性并检查它是否等于“密码”:
_assertEqual(_textbox("myTextBox").getAttribute("TYPE"), "password")
编辑:为避免混淆,根据下面 Narayan 的评论,正确的做法实际上是:
_assertExists(_password("id"))