[英]How to add a mouse listener to a JTree so that I can change the cursor (to a hand cursor) when hovering over a node?
[英]Check if mouse cursor changed to a hand while hovering over a link in Selenium?
在Java中使用Selenium時,我有什么方法可以檢測鼠標指針是否變為手指/手形指針?
您可以等待指針的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");
原始帖子: Selenium:如何等待光標改變?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.