等待功能测试
点击按钮,将在 0.5 秒后触发相应条件。使用开发者工具检查元素和事件。
重置页面
元素存在/不存在
触发 ele_elementExists 出现
触发 ele_elementNotExists 消失
元素可见/不可见
触发 ele_elementVisible 可见
触发 ele_elementNotVisible 不可见
元素可点击/不可点击
触发 ele_elementClickable 可点击
触发 ele_elementNotClickable 不可点击
文本内容
触发 ele_textContains 包含 "特殊文本"
触发 ele_textNotContains 移除 "特殊文本"
触发 ele_textMatches 匹配 /\d{3}/ (出现 123)
触发 ele_textNotMatches 移除 /\d{3}/ (移除 123)
URL 和 Title (手动更改或通过其他方式模拟)
URL 和 Title 的等待需要在地址栏或页面标题实际变化时测试。
触发 URL 匹配 (#matchedURL123)
触发 Title 匹配 (Title Matched ABC)
触发 URL 不匹配 (#noMatchHashXYZ)
触发 Title 不匹配 (Different Title 123)
属性
触发 ele_attributeMatches 的 data-test 属性匹配 /^value\d+$/ (变为 value1)
触发 ele_attributeMatches 的 data-test 属性移除或不匹配
触发 ele_elementHasClass 添加 'test-class'
触发 ele_elementHasClass 移除 'test-class'
触发 ele_elementHasAttribute 添加 'data-flag' 属性
触发 ele_elementHasAttribute 移除 'data-flag' 属性
元素数量
触发 .countable-item 数量 > 3 (添加第 4 个)
触发 .countable-item 数量 < 2 (移除到剩 1 个)
触发 .countable-item 数量 = 5 (添加/移除至 5 个)
1
2
3
元素事件
触发 ele_elementEvent 的 'custom-event' 事件
初始时存在,将被移除
初始时隐藏,将变可见
初始时可见,将变隐藏
初始时不可点击,将变可点击
初始时可点击,将变不可点击
Some initial text.
Some initial text with 特殊文本 here.
Text without numbers.
Text with 456 numbers.
初始属性
初始无特殊类
初始无特殊属性
监听事件的目标