Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion runner/scripts/adapters/ab_scenario_adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,12 @@ async function main() {
}
case "click": {
const times = Number(step.times || 1);
for (let i = 0; i < times; i += 1) await abOrThrow(["click", sel]);
for (let i = 0; i < times; i += 1) {
// The tool's click sends coordinates even when the center is outside
// the viewport. Use its native visibility operation before clicking.
await abOrThrow(["scrollintoview", sel]);
await abOrThrow(["click", sel]);
}
return `clicked x${times}`;
}
case "fill":
Expand All @@ -394,6 +399,7 @@ async function main() {
return `pressed ${step.key}`;
}
case "check":
await abOrThrow(["scrollintoview", sel]);
await abOrThrow(["check", sel]);
return "checked";
case "select_option": {
Expand Down
4 changes: 2 additions & 2 deletions runner/scripts/adapters/ferrum_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def run_op(step)
times = (step["times"] || 1).to_i
times.times do
node = find_node(timeout, sel)
call_op(timeout) { node.click }
call_op(timeout) { node.scroll_into_view.click }
end
"clicked x#{times}"
when "fill"
Expand All @@ -258,7 +258,7 @@ def run_op(step)
already = eval_value(timeout, sel_expr(sel, "return !!el.checked;"))
unless already == true
node = find_node(timeout, sel)
call_op(timeout) { node.click }
call_op(timeout) { node.scroll_into_view.click }
end
"checked"
when "select_option"
Expand Down
Loading