0

My script is working for slider but it moves only to higher value on the right side. In the application, default value is 25 and I can't able to change the exact position like from 25 to 65 or 25 to 10, etc.. Even if i use negative value it doesn't show any difference. Kindly resolve this issue, it will very helpful.

    driver.get("https://demoqa.com/widgets");
    driver.manage().window().maximize();
    driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

    
    WebElement element = driver.findElement(By.xpath("//span[text()='Slider']"));
    JavascriptExecutor executor = (JavascriptExecutor)driver;
    executor.executeScript("arguments[0].click();", element);     

    WebElement Slider = driver.findElement(By.xpath("//input[@type='range']"));

    Actions moveSlider = new Actions(driver);
    Action action = moveSlider.dragAndDropBy(Slider, 30, 0).build();

    action.perform();
    Thread.sleep(5000); 
    
user861594
  • 5,733
  • 3
  • 29
  • 45

0 Answers0