-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
[🐛 Bug]: #12736
Copy link
Copy link
Closed
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!G-chromedriverRequires fixes in ChromeDriverRequires fixes in ChromeDriverI-defectSomething is not working as intendedSomething is not working as intended
Description
What happened?
Using the mouse to move API on chrome and edge browsers (await actions.move ({x: randomNum, y: 0, origin: 'pointer', duration: duration}) .perform (); ) does not move smoothly and stutters occur.
There is no such problem on Firefox.
在chrome和edge浏览器上使用鼠标移动API(await actions.move({ x: randomNum, y: 0, origin: 'pointer', duration: duration }).perform();)无法平滑的移动,而出现卡顿。在火狐上不存在这样的问题
/**
* 人机验证滑动
* @param {chrome.Driver} driver
* @param {WebElement} element
*/
async function dragSlider(driver, element) {
let actions = driver.actions({ bridge: true });
// 移动鼠标到滑块
await actions.move({ origin: element }).perform();
await actions.press().perform();
let randomNum = Math.floor(Math.random() * 51) + 50;
let duration = Math.floor(Math.random() * 501) + 500;
let duration2 = Math.floor(Math.random() * 501) + 500;
await actions.move({ x: randomNum, y: 0, origin: 'pointer', duration: duration }).perform();
await new Promise((resolve) => setTimeout(resolve, 900));
await actions.move({ x: 197 - randomNum, y: 0, origin: 'pointer', duration: duration2 }).perform();
// 释放滑块
await actions.release().perform();
}
How can we reproduce the issue?
* 人机验证滑动
* @param {chrome.Driver} driver
* @param {WebElement} element
*/
async function dragSlider(driver, element) {
let actions = driver.actions({ bridge: true });
// 移动鼠标到滑块
await actions.move({ origin: element }).perform();
await actions.press().perform();
let randomNum = Math.floor(Math.random() * 51) + 50;
let duration = Math.floor(Math.random() * 501) + 500;
let duration2 = Math.floor(Math.random() * 501) + 500;
await actions.move({ x: randomNum, y: 0, origin: 'pointer', duration: duration }).perform();
await new Promise((resolve) => setTimeout(resolve, 900));
await actions.move({ x: 197 - randomNum, y: 0, origin: 'pointer', duration: duration2 }).perform();
// 释放滑块
await actions.release().perform();
}Relevant log output
noneOperating System
windows11
Selenium version
js "selenium-webdriver": "^4.12.0"
What are the browser(s) and version(s) where you see this issue?
chrome 117.0.5938.62
What are the browser driver(s) and version(s) where you see this issue?
ChromeDriver 117.0.5938.62 (25a7172909a4cba7355365cf424d7d7eb35231f4-refs/branch-heads/5938@{#1146})
Are you using Selenium Grid?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!G-chromedriverRequires fixes in ChromeDriverRequires fixes in ChromeDriverI-defectSomething is not working as intendedSomething is not working as intended