Answers for "selenium drag slider"

0

selenium drag slider

public class TestClass 
   {
        public static void main(String[] args) {         
        File file = new File("D:\\Driver\\IEDriverServer.exe");
        System.setProperty("webdriver.ie.driver", file.getAbsolutePath());
        WebDriver driver = new InternetExplorerDriver();
        driver.get("http://jqueryui.com/slider/");

        WebDriver driver = new InternetExplorerDriver();
        driver.get("http://jqueryui.com/slider/");
        driver.switchTo().frame(0); //need to switch to this frame before clicking the slider
        WebElement slider = driver.findElement(By.xpath("//div[@id='slider']/span"));
        Actions move = new Actions(driver);
        Action action = (Action) move.dragAndDropBy(slider, 30, 0).build();
        action.perform();
   }
Posted by: Guest on May-04-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language