Protractor Not Able To Move Price Slider
I am new to protractor, trying to test price slider which may sort products based on provided price range, i could not able to drag the slider(min point) using protractor.  how to
Solution 1:
This is what I use
/**
     * Drags first element to the second one. The destination can either be an elementFinder or an offset in pixels
     * @param    {ElementFinder}        $element
     * @param    {(ElementFinder|{x: number, y: number})}       $destination
     * @returns  {promise.Promise}
     */
    let dragAndDrop = ($element, $destination) => browser
            .actions()
            .mouseMove($element)
            .perform()
            .then(() =>
                browser
                    .actions()
                    .mouseDown($element)
                    .perform()
            )
            .then(() =>
                browser
                    .actions()
                    .mouseMove($destination)
                    .perform()
            )
            .then(() =>
                browser
                    .actions()
                    .mouseUp()
                    .perform()
            );
And then call
await dragAndDrop($leftGrip, {x: 10, y: 0});
But x might need to be negative depending on direction you're moving to
Solution 2:
I am not familiar with Protractor. However, if you can send me link to a sample site on which the slider is implemented, i can try with selenium-webdriver java.
In the meantime, you can look at the code in my answer to the below question to see if it helps you.
Post a Comment for "Protractor Not Able To Move Price Slider"