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"))
假设我将一个完整的 HTML 表(当每个tr和td具有额外属性时)复制到一个字符串中。如何获取所有内容(标签之间的内容)并创建一个像原始表格一样组织的二维数组?
tr
td
例如对于这个表:
<table border="1"> <tr align= "center"> <td align