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.
我正在尝试自动化手动脚本来检查 selenium 中是否存在文本框字段。你能帮我找到同样的吗?
您可以使用
assertElementPresent以及元素的路径。xpath=(//input[@type='text'])要不就//input[@type='text']
assertElementPresent
xpath=(//input[@type='text'])
//input[@type='text']
它将检查页面上是否存在带有文本类型的元素
assertEditable|//input[@name='name-of-this-field' and @type='text']
而不是 assertElementPresent
如果该字段不是文本框或文本区域,这将失败...