hcy3576538 发表于 2016-11-21 19:52:32

selenium WebDriver自动化如何定位操作带有滑动效果的验证码

如图所示

cc707cc 发表于 2016-11-22 04:59:36

TRY move.dragAndDropBy(slider, 30, 0).build()

WebDriver driver = new InternetExplorerDriver();
driver.get("http://jqueryui.com/demos/slider/");
//Identify WebElement
WebElement slider = driver.findElement(By.xpath("//div[@id='slider']/a"));

//Using Action Class
Actions move = new Actions(driver);
Action action = move.dragAndDropBy(slider, 30, 0).build();
action.perform();

driver.quit();

hcy3576538 发表于 2016-11-23 14:23:40

谢谢!我先去尝试一下

jingzizx 发表于 2016-11-29 20:09:05

滑动
页: [1]
查看完整版本: selenium WebDriver自动化如何定位操作带有滑动效果的验证码