本文介绍了鼠标在c#selenium上移动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的网页中,默认情况下元素是不可见的。但是当鼠标移动到该对象上时,该元素变得可见。我想让selenium做一个鼠标onhover并在它可见时单击该元素。可以完成吗? 请帮助您的宝贵意见..
解决方案我自己的解决方案是这样的: 行动行为= new 动作(驱动程序); IWebElement menuhover = driver.FindElement(By.Id( id)); act.MoveToElement(menuhover); act.Perform();
你检查一下吗? www.learnseleniumtesting/mouse-hover-and-other-mouse-events-in-webdriver/ [ ^ ]
In my webpage an element is invisible by default. But when mouse is moved onto that object, that element becomes visible. I want selenium to do a mouse onhover and click on that element when it is visible..Can that be done?? Please help with your valuable comments..
解决方案 My own solution is like this: Actions act = new Actions(driver); IWebElement menuhover = driver.FindElement(By.Id("id")); act.MoveToElement(menuhover); act.Perform();Do you check it? www.learnseleniumtesting/mouse-hover-and-other-mouse-events-in-webdriver/[^]更多推荐
鼠标在c#selenium上移动
发布评论