在Java中使用Selenium时,有没有办法检测鼠标指针是否变为手指/指针?
答案 0 :(得分:2)
您可以等待指针的css值更改。
// depends on which element you want to wait, here take <body> as an example
var wait = new WebDriverWait(driver, TimeSpan.FromMilliseconds(5000));
wait.Until(d => d.FindElement(By.TagName("body")).GetCssValue("cursor") == "pointer");