Action 操作

时间:2023-03-08 20:26:52
Action 操作

当鼠标移动到图片文件夹的时候,将有一些button显示

Action 操作

Action 操作

当鼠标移开这个文件夹,那些button隐藏了起来

Action 操作

Action 操作

display属性的变化

1.可以使用Js改变属性来操作

暂未验证,待时间。

2.可以使用Action来操作

// 打开Folder操作
var openFolderTableElement =
driver.FindElement(
By.CssSelector("table[data-name='图片']")); var mouseOverAction = new OpenQA.Selenium.Interactions.Actions(driver);
mouseOverAction.MoveToElement(openFolderTableElement);
//notice: Actions必须要执行perform
mouseOverAction.Perform();
openFolderTableElement.FindElement(By.CssSelector("div.menuBtn a.option_Open")).Click();