How to slide{move} slider in Selenium WebDriver

后端 未结 11 2033
花落未央
花落未央 2021-02-11 09:30

How to slide slider on horizontal progress bar URL: http://jqueryui.com/slider/ I tried to scroll the slider but it did not work for me. My code using Java is below:

         


        
11条回答
  •  醉酒成梦
    2021-02-11 10:25

    //Try this code
    WebElement e = driver.findElement(By.className("Class name of Dragger"));
    Actions move = new Actions(driver);
    move.moveToElement(e).clickAndHold().moveByOffset(0,250).release().perform();
    Thread.sleep(3500);
    

提交回复
热议问题